diff --git a/CHANGELOG.md b/CHANGELOG.md
index af3cc95c8ea1..85a5a268a857 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,43 @@
# CHANGELOG
+## `v36.0.0`
+
+### New Packages
+
+| Package Name | API Version |
+| -----------: | :---------: |
+| documentdb | 2019-08-01-preview |
+| machinelearningservices | 2019-11-01 |
+| managementgroups | 2019-11-01 |
+| policy | 2019-09-01 |
+| workspaces | 2019-10-01 |
+
+### Updated Packages
+
+| Package Name | API Version |
+| -----------: | :---------: |
+| datafactory | 2018-06-01 |
+| hanaonazure | 2017-11-03-preview |
+| securityinsight | 2017-08-01-preview |
+| storage | 2019-06-01 |
+
+### BreakingChanges
+
+| Package Name | API Version |
+| -----------: | :---------: |
+| authoring | luis |
+| network | 2019-04-01
2019-06-01
2019-07-01
2019-08-01
2019-09-01 |
+| serialconsole | 2018-05-01 |
+| signalr | 2018-10-01 |
+| sql | 2018-06-01-preview |
+| timeseriesinsights | 2018-08-15-preview |
+
+### Removed Packages
+
+| Package Name | API Version |
+| -----------: | :---------: |
+| documentdb | 2019-08-01-preview |
+
## `v35.1.0`
### New Packages
diff --git a/Gopkg.lock b/Gopkg.lock
index bdff68621acf..3d076a8f590b 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -154,7 +154,7 @@
[[projects]]
branch = "master"
- digest = "1:634f91b94015dfcb7fe2ab475ee7d6d05bffb0a8ada81839e07a3a3b43067802"
+ digest = "1:3a0c9d6a605d6a7c90e343ce34bdb8b894d69f6a9cbcda71351b5e48b8d754af"
name = "golang.org/x/tools"
packages = [
"go/ast/astutil",
@@ -172,7 +172,7 @@
"internal/span",
]
pruneopts = "UT"
- revision = "80f3f9ca0853fa9dbf1ffdc81029677e3c23108b"
+ revision = "6d8f1af9ccc0737695ff54584220e9967e9e661b"
[[projects]]
branch = "v1"
diff --git a/Gopkg.toml b/Gopkg.toml
index 397fd11b923c..01b90caabc49 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -25,7 +25,7 @@
[[constraint]]
name = "github.com/Azure/go-autorest"
- version = "13.3.0"
+ version = "13.0.0"
[[constraint]]
branch = "master"
diff --git a/profiles/latest/datafactory/mgmt/datafactory/models.go b/profiles/latest/datafactory/mgmt/datafactory/models.go
index 7d563468dc89..1a4cb55ecc90 100644
--- a/profiles/latest/datafactory/mgmt/datafactory/models.go
+++ b/profiles/latest/datafactory/mgmt/datafactory/models.go
@@ -606,8 +606,9 @@ const (
type SsisPackageLocationType = original.SsisPackageLocationType
const (
- File SsisPackageLocationType = original.File
- SSISDB SsisPackageLocationType = original.SSISDB
+ File SsisPackageLocationType = original.File
+ InlinePackage SsisPackageLocationType = original.InlinePackage
+ SSISDB SsisPackageLocationType = original.SSISDB
)
type StoredProcedureParameterType = original.StoredProcedureParameterType
@@ -1848,6 +1849,7 @@ type SQLServerTableDatasetTypeProperties = original.SQLServerTableDatasetTypePro
type SQLSink = original.SQLSink
type SQLSource = original.SQLSource
type SSISAccessCredential = original.SSISAccessCredential
+type SSISChildPackage = original.SSISChildPackage
type SSISExecutionCredential = original.SSISExecutionCredential
type SSISExecutionParameter = original.SSISExecutionParameter
type SSISLogLocation = original.SSISLogLocation
diff --git a/profiles/latest/machinelearning/mgmt/workspaces/models.go b/profiles/latest/machinelearning/mgmt/workspaces/models.go
index 9c326affd385..2d8d10ee0e19 100644
--- a/profiles/latest/machinelearning/mgmt/workspaces/models.go
+++ b/profiles/latest/machinelearning/mgmt/workspaces/models.go
@@ -22,7 +22,7 @@ package workspaces
import (
"context"
- original "github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces"
+ original "github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2019-10-01/workspaces"
)
const (
@@ -65,6 +65,7 @@ type OperationsClient = original.OperationsClient
type Properties = original.Properties
type PropertiesUpdateParameters = original.PropertiesUpdateParameters
type Resource = original.Resource
+type Sku = original.Sku
type UpdateParameters = original.UpdateParameters
type Workspace = original.Workspace
diff --git a/profiles/latest/machinelearning/mgmt/workspaces/workspacesapi/models.go b/profiles/latest/machinelearning/mgmt/workspaces/workspacesapi/models.go
index fc9027d0588b..00eba9a41c36 100644
--- a/profiles/latest/machinelearning/mgmt/workspaces/workspacesapi/models.go
+++ b/profiles/latest/machinelearning/mgmt/workspaces/workspacesapi/models.go
@@ -19,7 +19,7 @@
package workspacesapi
-import original "github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/workspacesapi"
+import original "github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2019-10-01/workspaces/workspacesapi"
type ClientAPI = original.ClientAPI
type OperationsClientAPI = original.OperationsClientAPI
diff --git a/profiles/latest/machinelearningservices/mgmt/machinelearningservices/machinelearningservicesapi/models.go b/profiles/latest/machinelearningservices/mgmt/machinelearningservices/machinelearningservicesapi/models.go
index 7304674d88f3..c4a603b4c42c 100644
--- a/profiles/latest/machinelearningservices/mgmt/machinelearningservices/machinelearningservicesapi/models.go
+++ b/profiles/latest/machinelearningservices/mgmt/machinelearningservices/machinelearningservicesapi/models.go
@@ -19,11 +19,13 @@
package machinelearningservicesapi
-import original "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/machinelearningservicesapi"
+import original "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningservicesapi"
+type BaseClientAPI = original.BaseClientAPI
type MachineLearningComputeClientAPI = original.MachineLearningComputeClientAPI
type OperationsClientAPI = original.OperationsClientAPI
type QuotasClientAPI = original.QuotasClientAPI
type UsagesClientAPI = original.UsagesClientAPI
type VirtualMachineSizesClientAPI = original.VirtualMachineSizesClientAPI
+type WorkspaceFeaturesClientAPI = original.WorkspaceFeaturesClientAPI
type WorkspacesClientAPI = original.WorkspacesClientAPI
diff --git a/profiles/latest/machinelearningservices/mgmt/machinelearningservices/models.go b/profiles/latest/machinelearningservices/mgmt/machinelearningservices/models.go
index ee20b507ed49..3b33f523c201 100644
--- a/profiles/latest/machinelearningservices/mgmt/machinelearningservices/models.go
+++ b/profiles/latest/machinelearningservices/mgmt/machinelearningservices/models.go
@@ -22,7 +22,7 @@ package machinelearningservices
import (
"context"
- original "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices"
+ original "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices"
)
const (
@@ -106,12 +106,20 @@ const (
Count QuotaUnit = original.Count
)
+type ReasonCode = original.ReasonCode
+
+const (
+ NotAvailableForRegion ReasonCode = original.NotAvailableForRegion
+ NotAvailableForSubscription ReasonCode = original.NotAvailableForSubscription
+ NotSpecified ReasonCode = original.NotSpecified
+)
+
type RemoteLoginPortPublicAccess = original.RemoteLoginPortPublicAccess
const (
- Disabled RemoteLoginPortPublicAccess = original.Disabled
- Enabled RemoteLoginPortPublicAccess = original.Enabled
- NotSpecified RemoteLoginPortPublicAccess = original.NotSpecified
+ RemoteLoginPortPublicAccessDisabled RemoteLoginPortPublicAccess = original.RemoteLoginPortPublicAccessDisabled
+ RemoteLoginPortPublicAccessEnabled RemoteLoginPortPublicAccess = original.RemoteLoginPortPublicAccessEnabled
+ RemoteLoginPortPublicAccessNotSpecified RemoteLoginPortPublicAccess = original.RemoteLoginPortPublicAccessNotSpecified
)
type ResourceIdentityType = original.ResourceIdentityType
@@ -127,6 +135,8 @@ const (
InvalidQuotaBelowClusterMinimum Status = original.InvalidQuotaBelowClusterMinimum
InvalidQuotaExceedsSubscriptionLimit Status = original.InvalidQuotaExceedsSubscriptionLimit
InvalidVMFamilyName Status = original.InvalidVMFamilyName
+ OperationNotEnabledForRegion Status = original.OperationNotEnabledForRegion
+ OperationNotSupportedForSku Status = original.OperationNotSupportedForSku
Success Status = original.Success
Undefined Status = original.Undefined
)
@@ -134,8 +144,8 @@ const (
type Status1 = original.Status1
const (
- Status1Disabled Status1 = original.Status1Disabled
- Status1Enabled Status1 = original.Status1Enabled
+ Disabled Status1 = original.Disabled
+ Enabled Status1 = original.Enabled
)
type UnderlyingResourceAction = original.UnderlyingResourceAction
@@ -166,6 +176,7 @@ type AmlCompute = original.AmlCompute
type AmlComputeNodeInformation = original.AmlComputeNodeInformation
type AmlComputeNodesInformation = original.AmlComputeNodesInformation
type AmlComputeProperties = original.AmlComputeProperties
+type AmlUserFeature = original.AmlUserFeature
type BaseClient = original.BaseClient
type BasicCompute = original.BasicCompute
type BasicComputeNodesInformation = original.BasicComputeNodesInformation
@@ -189,6 +200,9 @@ type ErrorResponse = original.ErrorResponse
type HDInsight = original.HDInsight
type HDInsightProperties = original.HDInsightProperties
type Identity = original.Identity
+type ListAmlUserFeatureResult = original.ListAmlUserFeatureResult
+type ListAmlUserFeatureResultIterator = original.ListAmlUserFeatureResultIterator
+type ListAmlUserFeatureResultPage = original.ListAmlUserFeatureResultPage
type ListUsagesResult = original.ListUsagesResult
type ListUsagesResultIterator = original.ListUsagesResultIterator
type ListUsagesResultPage = original.ListUsagesResultPage
@@ -217,8 +231,16 @@ type Resource = original.Resource
type ResourceID = original.ResourceID
type ResourceName = original.ResourceName
type ResourceQuota = original.ResourceQuota
+type ResourceSkuLocationInfo = original.ResourceSkuLocationInfo
+type ResourceSkuZoneDetails = original.ResourceSkuZoneDetails
+type Restriction = original.Restriction
+type SKUCapability = original.SKUCapability
type ScaleSettings = original.ScaleSettings
type ServicePrincipalCredentials = original.ServicePrincipalCredentials
+type Sku = original.Sku
+type SkuListResult = original.SkuListResult
+type SkuListResultIterator = original.SkuListResultIterator
+type SkuListResultPage = original.SkuListResultPage
type SslConfiguration = original.SslConfiguration
type SystemService = original.SystemService
type UpdateWorkspaceQuotas = original.UpdateWorkspaceQuotas
@@ -235,17 +257,25 @@ type VirtualMachineSize = original.VirtualMachineSize
type VirtualMachineSizeListResult = original.VirtualMachineSizeListResult
type VirtualMachineSizesClient = original.VirtualMachineSizesClient
type Workspace = original.Workspace
+type WorkspaceFeaturesClient = original.WorkspaceFeaturesClient
type WorkspaceListResult = original.WorkspaceListResult
type WorkspaceListResultIterator = original.WorkspaceListResultIterator
type WorkspaceListResultPage = original.WorkspaceListResultPage
type WorkspaceProperties = original.WorkspaceProperties
type WorkspacePropertiesUpdateParameters = original.WorkspacePropertiesUpdateParameters
+type WorkspaceSku = original.WorkspaceSku
type WorkspaceUpdateParameters = original.WorkspaceUpdateParameters
type WorkspacesClient = original.WorkspacesClient
func New(subscriptionID string) BaseClient {
return original.New(subscriptionID)
}
+func NewListAmlUserFeatureResultIterator(page ListAmlUserFeatureResultPage) ListAmlUserFeatureResultIterator {
+ return original.NewListAmlUserFeatureResultIterator(page)
+}
+func NewListAmlUserFeatureResultPage(getNextPage func(context.Context, ListAmlUserFeatureResult) (ListAmlUserFeatureResult, error)) ListAmlUserFeatureResultPage {
+ return original.NewListAmlUserFeatureResultPage(getNextPage)
+}
func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
return original.NewListUsagesResultIterator(page)
}
@@ -282,6 +312,12 @@ func NewQuotasClient(subscriptionID string) QuotasClient {
func NewQuotasClientWithBaseURI(baseURI string, subscriptionID string) QuotasClient {
return original.NewQuotasClientWithBaseURI(baseURI, subscriptionID)
}
+func NewSkuListResultIterator(page SkuListResultPage) SkuListResultIterator {
+ return original.NewSkuListResultIterator(page)
+}
+func NewSkuListResultPage(getNextPage func(context.Context, SkuListResult) (SkuListResult, error)) SkuListResultPage {
+ return original.NewSkuListResultPage(getNextPage)
+}
func NewUsagesClient(subscriptionID string) UsagesClient {
return original.NewUsagesClient(subscriptionID)
}
@@ -297,6 +333,12 @@ func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID stri
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
+func NewWorkspaceFeaturesClient(subscriptionID string) WorkspaceFeaturesClient {
+ return original.NewWorkspaceFeaturesClient(subscriptionID)
+}
+func NewWorkspaceFeaturesClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceFeaturesClient {
+ return original.NewWorkspaceFeaturesClientWithBaseURI(baseURI, subscriptionID)
+}
func NewWorkspaceListResultIterator(page WorkspaceListResultPage) WorkspaceListResultIterator {
return original.NewWorkspaceListResultIterator(page)
}
@@ -333,6 +375,9 @@ func PossibleProvisioningStateValues() []ProvisioningState {
func PossibleQuotaUnitValues() []QuotaUnit {
return original.PossibleQuotaUnitValues()
}
+func PossibleReasonCodeValues() []ReasonCode {
+ return original.PossibleReasonCodeValues()
+}
func PossibleRemoteLoginPortPublicAccessValues() []RemoteLoginPortPublicAccess {
return original.PossibleRemoteLoginPortPublicAccessValues()
}
diff --git a/profiles/latest/resources/mgmt/policy/models.go b/profiles/latest/resources/mgmt/policy/models.go
index a192ab1aeeee..10d313ff0499 100644
--- a/profiles/latest/resources/mgmt/policy/models.go
+++ b/profiles/latest/resources/mgmt/policy/models.go
@@ -22,7 +22,7 @@ package policy
import (
"context"
- original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/policy"
+ original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-09-01/policy"
)
const (
@@ -36,6 +36,18 @@ const (
DoNotEnforce EnforcementMode = original.DoNotEnforce
)
+type ParameterType = original.ParameterType
+
+const (
+ Array ParameterType = original.Array
+ Boolean ParameterType = original.Boolean
+ DateTime ParameterType = original.DateTime
+ Float ParameterType = original.Float
+ Integer ParameterType = original.Integer
+ Object ParameterType = original.Object
+ String ParameterType = original.String
+)
+
type ResourceIdentityType = original.ResourceIdentityType
const (
@@ -49,6 +61,7 @@ const (
BuiltIn Type = original.BuiltIn
Custom Type = original.Custom
NotSpecified Type = original.NotSpecified
+ Static Type = original.Static
)
type Assignment = original.Assignment
@@ -58,15 +71,21 @@ type AssignmentListResultPage = original.AssignmentListResultPage
type AssignmentProperties = original.AssignmentProperties
type AssignmentsClient = original.AssignmentsClient
type BaseClient = original.BaseClient
+type CloudError = original.CloudError
type Definition = original.Definition
+type DefinitionGroup = original.DefinitionGroup
type DefinitionListResult = original.DefinitionListResult
type DefinitionListResultIterator = original.DefinitionListResultIterator
type DefinitionListResultPage = original.DefinitionListResultPage
type DefinitionProperties = original.DefinitionProperties
type DefinitionReference = original.DefinitionReference
type DefinitionsClient = original.DefinitionsClient
+type ErrorAdditionalInfo = original.ErrorAdditionalInfo
type ErrorResponse = original.ErrorResponse
type Identity = original.Identity
+type ParameterDefinitionsValue = original.ParameterDefinitionsValue
+type ParameterDefinitionsValueMetadata = original.ParameterDefinitionsValueMetadata
+type ParameterValuesValue = original.ParameterValuesValue
type SetDefinition = original.SetDefinition
type SetDefinitionListResult = original.SetDefinitionListResult
type SetDefinitionListResultIterator = original.SetDefinitionListResultIterator
@@ -120,6 +139,9 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
func PossibleEnforcementModeValues() []EnforcementMode {
return original.PossibleEnforcementModeValues()
}
+func PossibleParameterTypeValues() []ParameterType {
+ return original.PossibleParameterTypeValues()
+}
func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
return original.PossibleResourceIdentityTypeValues()
}
diff --git a/profiles/latest/resources/mgmt/policy/policyapi/models.go b/profiles/latest/resources/mgmt/policy/policyapi/models.go
index be7cec1ae017..c57141c7a2f4 100644
--- a/profiles/latest/resources/mgmt/policy/policyapi/models.go
+++ b/profiles/latest/resources/mgmt/policy/policyapi/models.go
@@ -19,7 +19,7 @@
package policyapi
-import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/policy/policyapi"
+import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-09-01/policy/policyapi"
type AssignmentsClientAPI = original.AssignmentsClientAPI
type DefinitionsClientAPI = original.DefinitionsClientAPI
diff --git a/profiles/latest/serialconsole/mgmt/serialconsole/models.go b/profiles/latest/serialconsole/mgmt/serialconsole/models.go
index 01d78fe04ae4..e7b4b9fd4410 100644
--- a/profiles/latest/serialconsole/mgmt/serialconsole/models.go
+++ b/profiles/latest/serialconsole/mgmt/serialconsole/models.go
@@ -26,36 +26,18 @@ const (
)
type BaseClient = original.BaseClient
-type ConsoleClient = original.ConsoleClient
-type DeploymentValidateResult = original.DeploymentValidateResult
-type GetDisabledResult = original.GetDisabledResult
-type GetResult = original.GetResult
-type ListClient = original.ListClient
-type ListConsoleClient = original.ListConsoleClient
+type DisableSerialConsoleResult = original.DisableSerialConsoleResult
+type EnableSerialConsoleResult = original.EnableSerialConsoleResult
+type GetSerialConsoleSubscriptionNotFound = original.GetSerialConsoleSubscriptionNotFound
type Operations = original.Operations
-type SetDisabledResult = original.SetDisabledResult
+type OperationsValueItem = original.OperationsValueItem
+type OperationsValueItemDisplay = original.OperationsValueItemDisplay
+type SetObject = original.SetObject
+type Status = original.Status
func New(subscriptionID string) BaseClient {
return original.New(subscriptionID)
}
-func NewConsoleClient(subscriptionID string) ConsoleClient {
- return original.NewConsoleClient(subscriptionID)
-}
-func NewConsoleClientWithBaseURI(baseURI string, subscriptionID string) ConsoleClient {
- return original.NewConsoleClientWithBaseURI(baseURI, subscriptionID)
-}
-func NewListClient(subscriptionID string) ListClient {
- return original.NewListClient(subscriptionID)
-}
-func NewListClientWithBaseURI(baseURI string, subscriptionID string) ListClient {
- return original.NewListClientWithBaseURI(baseURI, subscriptionID)
-}
-func NewListConsoleClient(subscriptionID string) ListConsoleClient {
- return original.NewListConsoleClient(subscriptionID)
-}
-func NewListConsoleClientWithBaseURI(baseURI string, subscriptionID string) ListConsoleClient {
- return original.NewListConsoleClientWithBaseURI(baseURI, subscriptionID)
-}
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
diff --git a/profiles/latest/serialconsole/mgmt/serialconsole/serialconsoleapi/models.go b/profiles/latest/serialconsole/mgmt/serialconsole/serialconsoleapi/models.go
index 1d3c2872f688..713d3c085568 100644
--- a/profiles/latest/serialconsole/mgmt/serialconsole/serialconsoleapi/models.go
+++ b/profiles/latest/serialconsole/mgmt/serialconsole/serialconsoleapi/models.go
@@ -21,6 +21,4 @@ package serialconsoleapi
import original "github.com/Azure/azure-sdk-for-go/services/serialconsole/mgmt/2018-05-01/serialconsole/serialconsoleapi"
-type ConsoleClientAPI = original.ConsoleClientAPI
-type ListClientAPI = original.ListClientAPI
-type ListConsoleClientAPI = original.ListConsoleClientAPI
+type BaseClientAPI = original.BaseClientAPI
diff --git a/profiles/latest/signalr/mgmt/signalr/models.go b/profiles/latest/signalr/mgmt/signalr/models.go
index d7a4c612b6ab..571cef513466 100644
--- a/profiles/latest/signalr/mgmt/signalr/models.go
+++ b/profiles/latest/signalr/mgmt/signalr/models.go
@@ -29,6 +29,13 @@ const (
DefaultBaseURI = original.DefaultBaseURI
)
+type FeatureFlags = original.FeatureFlags
+
+const (
+ EnableConnectivityLogs FeatureFlags = original.EnableConnectivityLogs
+ ServiceMode FeatureFlags = original.ServiceMode
+)
+
type KeyType = original.KeyType
const (
@@ -67,8 +74,11 @@ type CreateOrUpdateProperties = original.CreateOrUpdateProperties
type CreateParameters = original.CreateParameters
type DeleteFuture = original.DeleteFuture
type Dimension = original.Dimension
+type ErrorResponse = original.ErrorResponse
+type ErrorResponseBody = original.ErrorResponseBody
type Feature = original.Feature
type Keys = original.Keys
+type LogSpecification = original.LogSpecification
type MetricSpecification = original.MetricSpecification
type NameAvailability = original.NameAvailability
type NameAvailabilityParameters = original.NameAvailabilityParameters
@@ -142,6 +152,9 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
+func PossibleFeatureFlagsValues() []FeatureFlags {
+ return original.PossibleFeatureFlagsValues()
+}
func PossibleKeyTypeValues() []KeyType {
return original.PossibleKeyTypeValues()
}
diff --git a/profiles/preview/datafactory/mgmt/datafactory/models.go b/profiles/preview/datafactory/mgmt/datafactory/models.go
index 49ed031c0d23..d1fde85048f3 100644
--- a/profiles/preview/datafactory/mgmt/datafactory/models.go
+++ b/profiles/preview/datafactory/mgmt/datafactory/models.go
@@ -606,8 +606,9 @@ const (
type SsisPackageLocationType = original.SsisPackageLocationType
const (
- File SsisPackageLocationType = original.File
- SSISDB SsisPackageLocationType = original.SSISDB
+ File SsisPackageLocationType = original.File
+ InlinePackage SsisPackageLocationType = original.InlinePackage
+ SSISDB SsisPackageLocationType = original.SSISDB
)
type StoredProcedureParameterType = original.StoredProcedureParameterType
@@ -1848,6 +1849,7 @@ type SQLServerTableDatasetTypeProperties = original.SQLServerTableDatasetTypePro
type SQLSink = original.SQLSink
type SQLSource = original.SQLSource
type SSISAccessCredential = original.SSISAccessCredential
+type SSISChildPackage = original.SSISChildPackage
type SSISExecutionCredential = original.SSISExecutionCredential
type SSISExecutionParameter = original.SSISExecutionParameter
type SSISLogLocation = original.SSISLogLocation
diff --git a/profiles/preview/machinelearning/mgmt/workspaces/models.go b/profiles/preview/machinelearning/mgmt/workspaces/models.go
index 227a5bc5b2f0..2edf2e649de1 100644
--- a/profiles/preview/machinelearning/mgmt/workspaces/models.go
+++ b/profiles/preview/machinelearning/mgmt/workspaces/models.go
@@ -22,7 +22,7 @@ package workspaces
import (
"context"
- original "github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces"
+ original "github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2019-10-01/workspaces"
)
const (
@@ -65,6 +65,7 @@ type OperationsClient = original.OperationsClient
type Properties = original.Properties
type PropertiesUpdateParameters = original.PropertiesUpdateParameters
type Resource = original.Resource
+type Sku = original.Sku
type UpdateParameters = original.UpdateParameters
type Workspace = original.Workspace
diff --git a/profiles/preview/machinelearning/mgmt/workspaces/workspacesapi/models.go b/profiles/preview/machinelearning/mgmt/workspaces/workspacesapi/models.go
index fc9027d0588b..00eba9a41c36 100644
--- a/profiles/preview/machinelearning/mgmt/workspaces/workspacesapi/models.go
+++ b/profiles/preview/machinelearning/mgmt/workspaces/workspacesapi/models.go
@@ -19,7 +19,7 @@
package workspacesapi
-import original "github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/workspacesapi"
+import original "github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2019-10-01/workspaces/workspacesapi"
type ClientAPI = original.ClientAPI
type OperationsClientAPI = original.OperationsClientAPI
diff --git a/profiles/preview/machinelearningservices/mgmt/machinelearningservices/machinelearningservicesapi/models.go b/profiles/preview/machinelearningservices/mgmt/machinelearningservices/machinelearningservicesapi/models.go
index 7304674d88f3..c4a603b4c42c 100644
--- a/profiles/preview/machinelearningservices/mgmt/machinelearningservices/machinelearningservicesapi/models.go
+++ b/profiles/preview/machinelearningservices/mgmt/machinelearningservices/machinelearningservicesapi/models.go
@@ -19,11 +19,13 @@
package machinelearningservicesapi
-import original "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/machinelearningservicesapi"
+import original "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningservicesapi"
+type BaseClientAPI = original.BaseClientAPI
type MachineLearningComputeClientAPI = original.MachineLearningComputeClientAPI
type OperationsClientAPI = original.OperationsClientAPI
type QuotasClientAPI = original.QuotasClientAPI
type UsagesClientAPI = original.UsagesClientAPI
type VirtualMachineSizesClientAPI = original.VirtualMachineSizesClientAPI
+type WorkspaceFeaturesClientAPI = original.WorkspaceFeaturesClientAPI
type WorkspacesClientAPI = original.WorkspacesClientAPI
diff --git a/profiles/preview/machinelearningservices/mgmt/machinelearningservices/models.go b/profiles/preview/machinelearningservices/mgmt/machinelearningservices/models.go
index d685dcb8580c..4f28e7ac6a8c 100644
--- a/profiles/preview/machinelearningservices/mgmt/machinelearningservices/models.go
+++ b/profiles/preview/machinelearningservices/mgmt/machinelearningservices/models.go
@@ -22,7 +22,7 @@ package machinelearningservices
import (
"context"
- original "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices"
+ original "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices"
)
const (
@@ -106,12 +106,20 @@ const (
Count QuotaUnit = original.Count
)
+type ReasonCode = original.ReasonCode
+
+const (
+ NotAvailableForRegion ReasonCode = original.NotAvailableForRegion
+ NotAvailableForSubscription ReasonCode = original.NotAvailableForSubscription
+ NotSpecified ReasonCode = original.NotSpecified
+)
+
type RemoteLoginPortPublicAccess = original.RemoteLoginPortPublicAccess
const (
- Disabled RemoteLoginPortPublicAccess = original.Disabled
- Enabled RemoteLoginPortPublicAccess = original.Enabled
- NotSpecified RemoteLoginPortPublicAccess = original.NotSpecified
+ RemoteLoginPortPublicAccessDisabled RemoteLoginPortPublicAccess = original.RemoteLoginPortPublicAccessDisabled
+ RemoteLoginPortPublicAccessEnabled RemoteLoginPortPublicAccess = original.RemoteLoginPortPublicAccessEnabled
+ RemoteLoginPortPublicAccessNotSpecified RemoteLoginPortPublicAccess = original.RemoteLoginPortPublicAccessNotSpecified
)
type ResourceIdentityType = original.ResourceIdentityType
@@ -127,6 +135,8 @@ const (
InvalidQuotaBelowClusterMinimum Status = original.InvalidQuotaBelowClusterMinimum
InvalidQuotaExceedsSubscriptionLimit Status = original.InvalidQuotaExceedsSubscriptionLimit
InvalidVMFamilyName Status = original.InvalidVMFamilyName
+ OperationNotEnabledForRegion Status = original.OperationNotEnabledForRegion
+ OperationNotSupportedForSku Status = original.OperationNotSupportedForSku
Success Status = original.Success
Undefined Status = original.Undefined
)
@@ -134,8 +144,8 @@ const (
type Status1 = original.Status1
const (
- Status1Disabled Status1 = original.Status1Disabled
- Status1Enabled Status1 = original.Status1Enabled
+ Disabled Status1 = original.Disabled
+ Enabled Status1 = original.Enabled
)
type UnderlyingResourceAction = original.UnderlyingResourceAction
@@ -166,6 +176,7 @@ type AmlCompute = original.AmlCompute
type AmlComputeNodeInformation = original.AmlComputeNodeInformation
type AmlComputeNodesInformation = original.AmlComputeNodesInformation
type AmlComputeProperties = original.AmlComputeProperties
+type AmlUserFeature = original.AmlUserFeature
type BaseClient = original.BaseClient
type BasicCompute = original.BasicCompute
type BasicComputeNodesInformation = original.BasicComputeNodesInformation
@@ -189,6 +200,9 @@ type ErrorResponse = original.ErrorResponse
type HDInsight = original.HDInsight
type HDInsightProperties = original.HDInsightProperties
type Identity = original.Identity
+type ListAmlUserFeatureResult = original.ListAmlUserFeatureResult
+type ListAmlUserFeatureResultIterator = original.ListAmlUserFeatureResultIterator
+type ListAmlUserFeatureResultPage = original.ListAmlUserFeatureResultPage
type ListUsagesResult = original.ListUsagesResult
type ListUsagesResultIterator = original.ListUsagesResultIterator
type ListUsagesResultPage = original.ListUsagesResultPage
@@ -217,8 +231,16 @@ type Resource = original.Resource
type ResourceID = original.ResourceID
type ResourceName = original.ResourceName
type ResourceQuota = original.ResourceQuota
+type ResourceSkuLocationInfo = original.ResourceSkuLocationInfo
+type ResourceSkuZoneDetails = original.ResourceSkuZoneDetails
+type Restriction = original.Restriction
+type SKUCapability = original.SKUCapability
type ScaleSettings = original.ScaleSettings
type ServicePrincipalCredentials = original.ServicePrincipalCredentials
+type Sku = original.Sku
+type SkuListResult = original.SkuListResult
+type SkuListResultIterator = original.SkuListResultIterator
+type SkuListResultPage = original.SkuListResultPage
type SslConfiguration = original.SslConfiguration
type SystemService = original.SystemService
type UpdateWorkspaceQuotas = original.UpdateWorkspaceQuotas
@@ -235,17 +257,25 @@ type VirtualMachineSize = original.VirtualMachineSize
type VirtualMachineSizeListResult = original.VirtualMachineSizeListResult
type VirtualMachineSizesClient = original.VirtualMachineSizesClient
type Workspace = original.Workspace
+type WorkspaceFeaturesClient = original.WorkspaceFeaturesClient
type WorkspaceListResult = original.WorkspaceListResult
type WorkspaceListResultIterator = original.WorkspaceListResultIterator
type WorkspaceListResultPage = original.WorkspaceListResultPage
type WorkspaceProperties = original.WorkspaceProperties
type WorkspacePropertiesUpdateParameters = original.WorkspacePropertiesUpdateParameters
+type WorkspaceSku = original.WorkspaceSku
type WorkspaceUpdateParameters = original.WorkspaceUpdateParameters
type WorkspacesClient = original.WorkspacesClient
func New(subscriptionID string) BaseClient {
return original.New(subscriptionID)
}
+func NewListAmlUserFeatureResultIterator(page ListAmlUserFeatureResultPage) ListAmlUserFeatureResultIterator {
+ return original.NewListAmlUserFeatureResultIterator(page)
+}
+func NewListAmlUserFeatureResultPage(getNextPage func(context.Context, ListAmlUserFeatureResult) (ListAmlUserFeatureResult, error)) ListAmlUserFeatureResultPage {
+ return original.NewListAmlUserFeatureResultPage(getNextPage)
+}
func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
return original.NewListUsagesResultIterator(page)
}
@@ -282,6 +312,12 @@ func NewQuotasClient(subscriptionID string) QuotasClient {
func NewQuotasClientWithBaseURI(baseURI string, subscriptionID string) QuotasClient {
return original.NewQuotasClientWithBaseURI(baseURI, subscriptionID)
}
+func NewSkuListResultIterator(page SkuListResultPage) SkuListResultIterator {
+ return original.NewSkuListResultIterator(page)
+}
+func NewSkuListResultPage(getNextPage func(context.Context, SkuListResult) (SkuListResult, error)) SkuListResultPage {
+ return original.NewSkuListResultPage(getNextPage)
+}
func NewUsagesClient(subscriptionID string) UsagesClient {
return original.NewUsagesClient(subscriptionID)
}
@@ -297,6 +333,12 @@ func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID stri
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
+func NewWorkspaceFeaturesClient(subscriptionID string) WorkspaceFeaturesClient {
+ return original.NewWorkspaceFeaturesClient(subscriptionID)
+}
+func NewWorkspaceFeaturesClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceFeaturesClient {
+ return original.NewWorkspaceFeaturesClientWithBaseURI(baseURI, subscriptionID)
+}
func NewWorkspaceListResultIterator(page WorkspaceListResultPage) WorkspaceListResultIterator {
return original.NewWorkspaceListResultIterator(page)
}
@@ -333,6 +375,9 @@ func PossibleProvisioningStateValues() []ProvisioningState {
func PossibleQuotaUnitValues() []QuotaUnit {
return original.PossibleQuotaUnitValues()
}
+func PossibleReasonCodeValues() []ReasonCode {
+ return original.PossibleReasonCodeValues()
+}
func PossibleRemoteLoginPortPublicAccessValues() []RemoteLoginPortPublicAccess {
return original.PossibleRemoteLoginPortPublicAccessValues()
}
diff --git a/profiles/preview/preview/cognitiveservices/luis/authoring/models.go b/profiles/preview/preview/cognitiveservices/luis/authoring/models.go
index cec1f7e12769..419c0c92ba50 100644
--- a/profiles/preview/preview/cognitiveservices/luis/authoring/models.go
+++ b/profiles/preview/preview/cognitiveservices/luis/authoring/models.go
@@ -306,8 +306,10 @@ type Int64 = original.Int64
type IntentClassifier = original.IntentClassifier
type IntentPrediction = original.IntentPrediction
type IntentsSuggestionExample = original.IntentsSuggestionExample
+type JSONChild = original.JSONChild
type JSONEntity = original.JSONEntity
type JSONModelFeature = original.JSONModelFeature
+type JSONModelFeatureInformation = original.JSONModelFeatureInformation
type JSONRegexFeature = original.JSONRegexFeature
type JSONUtterance = original.JSONUtterance
type LabelExampleResponse = original.LabelExampleResponse
diff --git a/profiles/preview/preview/cosmos-db/mgmt/documentdb/documentdbapi/models.go b/profiles/preview/preview/cosmos-db/mgmt/documentdb/documentdbapi/models.go
new file mode 100644
index 000000000000..adf8c82e8e89
--- /dev/null
+++ b/profiles/preview/preview/cosmos-db/mgmt/documentdb/documentdbapi/models.go
@@ -0,0 +1,43 @@
+// +build go1.9
+
+// Copyright 2019 Microsoft Corporation
+//
+// 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package documentdbapi
+
+import original "github.com/Azure/azure-sdk-for-go/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/documentdbapi"
+
+type CassandraResourcesClientAPI = original.CassandraResourcesClientAPI
+type CollectionClientAPI = original.CollectionClientAPI
+type CollectionPartitionClientAPI = original.CollectionPartitionClientAPI
+type CollectionPartitionRegionClientAPI = original.CollectionPartitionRegionClientAPI
+type CollectionRegionClientAPI = original.CollectionRegionClientAPI
+type DatabaseAccountRegionClientAPI = original.DatabaseAccountRegionClientAPI
+type DatabaseAccountsClientAPI = original.DatabaseAccountsClientAPI
+type DatabaseClientAPI = original.DatabaseClientAPI
+type GremlinResourcesClientAPI = original.GremlinResourcesClientAPI
+type MongoDBResourcesClientAPI = original.MongoDBResourcesClientAPI
+type OperationsClientAPI = original.OperationsClientAPI
+type PartitionKeyRangeIDClientAPI = original.PartitionKeyRangeIDClientAPI
+type PartitionKeyRangeIDRegionClientAPI = original.PartitionKeyRangeIDRegionClientAPI
+type PercentileClientAPI = original.PercentileClientAPI
+type PercentileSourceTargetClientAPI = original.PercentileSourceTargetClientAPI
+type PercentileTargetClientAPI = original.PercentileTargetClientAPI
+type PrivateEndpointConnectionsClientAPI = original.PrivateEndpointConnectionsClientAPI
+type PrivateLinkResourcesClientAPI = original.PrivateLinkResourcesClientAPI
+type SQLResourcesClientAPI = original.SQLResourcesClientAPI
+type TableResourcesClientAPI = original.TableResourcesClientAPI
diff --git a/profiles/preview/preview/cosmos-db/mgmt/documentdb/models.go b/profiles/preview/preview/cosmos-db/mgmt/documentdb/models.go
new file mode 100644
index 000000000000..52092fed9e02
--- /dev/null
+++ b/profiles/preview/preview/cosmos-db/mgmt/documentdb/models.go
@@ -0,0 +1,543 @@
+// +build go1.9
+
+// Copyright 2019 Microsoft Corporation
+//
+// 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package documentdb
+
+import (
+ "context"
+
+ original "github.com/Azure/azure-sdk-for-go/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb"
+)
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type ConflictResolutionMode = original.ConflictResolutionMode
+
+const (
+ Custom ConflictResolutionMode = original.Custom
+ LastWriterWins ConflictResolutionMode = original.LastWriterWins
+)
+
+type ConnectorOffer = original.ConnectorOffer
+
+const (
+ Small ConnectorOffer = original.Small
+)
+
+type DataType = original.DataType
+
+const (
+ LineString DataType = original.LineString
+ MultiPolygon DataType = original.MultiPolygon
+ Number DataType = original.Number
+ Point DataType = original.Point
+ Polygon DataType = original.Polygon
+ String DataType = original.String
+)
+
+type DatabaseAccountKind = original.DatabaseAccountKind
+
+const (
+ GlobalDocumentDB DatabaseAccountKind = original.GlobalDocumentDB
+ MongoDB DatabaseAccountKind = original.MongoDB
+ Parse DatabaseAccountKind = original.Parse
+)
+
+type DatabaseAccountOfferType = original.DatabaseAccountOfferType
+
+const (
+ Standard DatabaseAccountOfferType = original.Standard
+)
+
+type DefaultConsistencyLevel = original.DefaultConsistencyLevel
+
+const (
+ BoundedStaleness DefaultConsistencyLevel = original.BoundedStaleness
+ ConsistentPrefix DefaultConsistencyLevel = original.ConsistentPrefix
+ Eventual DefaultConsistencyLevel = original.Eventual
+ Session DefaultConsistencyLevel = original.Session
+ Strong DefaultConsistencyLevel = original.Strong
+)
+
+type IndexKind = original.IndexKind
+
+const (
+ Hash IndexKind = original.Hash
+ Range IndexKind = original.Range
+ Spatial IndexKind = original.Spatial
+)
+
+type IndexingMode = original.IndexingMode
+
+const (
+ Consistent IndexingMode = original.Consistent
+ Lazy IndexingMode = original.Lazy
+ None IndexingMode = original.None
+)
+
+type KeyKind = original.KeyKind
+
+const (
+ Primary KeyKind = original.Primary
+ PrimaryReadonly KeyKind = original.PrimaryReadonly
+ Secondary KeyKind = original.Secondary
+ SecondaryReadonly KeyKind = original.SecondaryReadonly
+)
+
+type PartitionKind = original.PartitionKind
+
+const (
+ PartitionKindHash PartitionKind = original.PartitionKindHash
+ PartitionKindRange PartitionKind = original.PartitionKindRange
+)
+
+type PrimaryAggregationType = original.PrimaryAggregationType
+
+const (
+ PrimaryAggregationTypeAverage PrimaryAggregationType = original.PrimaryAggregationTypeAverage
+ PrimaryAggregationTypeLast PrimaryAggregationType = original.PrimaryAggregationTypeLast
+ PrimaryAggregationTypeMaximum PrimaryAggregationType = original.PrimaryAggregationTypeMaximum
+ PrimaryAggregationTypeMinimum PrimaryAggregationType = original.PrimaryAggregationTypeMinimum
+ PrimaryAggregationTypeNone PrimaryAggregationType = original.PrimaryAggregationTypeNone
+ PrimaryAggregationTypeTotal PrimaryAggregationType = original.PrimaryAggregationTypeTotal
+)
+
+type TriggerOperation = original.TriggerOperation
+
+const (
+ All TriggerOperation = original.All
+ Create TriggerOperation = original.Create
+ Delete TriggerOperation = original.Delete
+ Replace TriggerOperation = original.Replace
+ Update TriggerOperation = original.Update
+)
+
+type TriggerType = original.TriggerType
+
+const (
+ Post TriggerType = original.Post
+ Pre TriggerType = original.Pre
+)
+
+type UnitType = original.UnitType
+
+const (
+ Bytes UnitType = original.Bytes
+ BytesPerSecond UnitType = original.BytesPerSecond
+ Count UnitType = original.Count
+ CountPerSecond UnitType = original.CountPerSecond
+ Milliseconds UnitType = original.Milliseconds
+ Percent UnitType = original.Percent
+ Seconds UnitType = original.Seconds
+)
+
+type ARMProxyResource = original.ARMProxyResource
+type ARMResourceProperties = original.ARMResourceProperties
+type AzureEntityResource = original.AzureEntityResource
+type BaseClient = original.BaseClient
+type Capability = original.Capability
+type CassandraKeyspaceCreateUpdateParameters = original.CassandraKeyspaceCreateUpdateParameters
+type CassandraKeyspaceCreateUpdateProperties = original.CassandraKeyspaceCreateUpdateProperties
+type CassandraKeyspaceGetProperties = original.CassandraKeyspaceGetProperties
+type CassandraKeyspaceGetResults = original.CassandraKeyspaceGetResults
+type CassandraKeyspaceListResult = original.CassandraKeyspaceListResult
+type CassandraKeyspaceResource = original.CassandraKeyspaceResource
+type CassandraPartitionKey = original.CassandraPartitionKey
+type CassandraResourcesClient = original.CassandraResourcesClient
+type CassandraResourcesCreateUpdateCassandraKeyspaceFuture = original.CassandraResourcesCreateUpdateCassandraKeyspaceFuture
+type CassandraResourcesCreateUpdateCassandraTableFuture = original.CassandraResourcesCreateUpdateCassandraTableFuture
+type CassandraResourcesDeleteCassandraKeyspaceFuture = original.CassandraResourcesDeleteCassandraKeyspaceFuture
+type CassandraResourcesDeleteCassandraTableFuture = original.CassandraResourcesDeleteCassandraTableFuture
+type CassandraResourcesUpdateCassandraKeyspaceThroughputFuture = original.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture
+type CassandraResourcesUpdateCassandraTableThroughputFuture = original.CassandraResourcesUpdateCassandraTableThroughputFuture
+type CassandraSchema = original.CassandraSchema
+type CassandraTableCreateUpdateParameters = original.CassandraTableCreateUpdateParameters
+type CassandraTableCreateUpdateProperties = original.CassandraTableCreateUpdateProperties
+type CassandraTableGetProperties = original.CassandraTableGetProperties
+type CassandraTableGetResults = original.CassandraTableGetResults
+type CassandraTableListResult = original.CassandraTableListResult
+type CassandraTableResource = original.CassandraTableResource
+type ClusterKey = original.ClusterKey
+type CollectionClient = original.CollectionClient
+type CollectionPartitionClient = original.CollectionPartitionClient
+type CollectionPartitionRegionClient = original.CollectionPartitionRegionClient
+type CollectionRegionClient = original.CollectionRegionClient
+type Column = original.Column
+type ConflictResolutionPolicy = original.ConflictResolutionPolicy
+type ConsistencyPolicy = original.ConsistencyPolicy
+type ContainerPartitionKey = original.ContainerPartitionKey
+type DatabaseAccountConnectionString = original.DatabaseAccountConnectionString
+type DatabaseAccountCreateUpdateParameters = original.DatabaseAccountCreateUpdateParameters
+type DatabaseAccountCreateUpdateProperties = original.DatabaseAccountCreateUpdateProperties
+type DatabaseAccountGetProperties = original.DatabaseAccountGetProperties
+type DatabaseAccountGetResults = original.DatabaseAccountGetResults
+type DatabaseAccountListConnectionStringsResult = original.DatabaseAccountListConnectionStringsResult
+type DatabaseAccountListKeysResult = original.DatabaseAccountListKeysResult
+type DatabaseAccountListReadOnlyKeysResult = original.DatabaseAccountListReadOnlyKeysResult
+type DatabaseAccountRegenerateKeyParameters = original.DatabaseAccountRegenerateKeyParameters
+type DatabaseAccountRegionClient = original.DatabaseAccountRegionClient
+type DatabaseAccountUpdateParameters = original.DatabaseAccountUpdateParameters
+type DatabaseAccountUpdateProperties = original.DatabaseAccountUpdateProperties
+type DatabaseAccountsClient = original.DatabaseAccountsClient
+type DatabaseAccountsCreateOrUpdateFuture = original.DatabaseAccountsCreateOrUpdateFuture
+type DatabaseAccountsDeleteFuture = original.DatabaseAccountsDeleteFuture
+type DatabaseAccountsFailoverPriorityChangeFuture = original.DatabaseAccountsFailoverPriorityChangeFuture
+type DatabaseAccountsListResult = original.DatabaseAccountsListResult
+type DatabaseAccountsOfflineRegionFuture = original.DatabaseAccountsOfflineRegionFuture
+type DatabaseAccountsOnlineRegionFuture = original.DatabaseAccountsOnlineRegionFuture
+type DatabaseAccountsRegenerateKeyFuture = original.DatabaseAccountsRegenerateKeyFuture
+type DatabaseAccountsUpdateFuture = original.DatabaseAccountsUpdateFuture
+type DatabaseClient = original.DatabaseClient
+type ErrorResponse = original.ErrorResponse
+type ExcludedPath = original.ExcludedPath
+type ExtendedResourceProperties = original.ExtendedResourceProperties
+type FailoverPolicies = original.FailoverPolicies
+type FailoverPolicy = original.FailoverPolicy
+type GremlinDatabaseCreateUpdateParameters = original.GremlinDatabaseCreateUpdateParameters
+type GremlinDatabaseCreateUpdateProperties = original.GremlinDatabaseCreateUpdateProperties
+type GremlinDatabaseGetProperties = original.GremlinDatabaseGetProperties
+type GremlinDatabaseGetResults = original.GremlinDatabaseGetResults
+type GremlinDatabaseListResult = original.GremlinDatabaseListResult
+type GremlinDatabaseResource = original.GremlinDatabaseResource
+type GremlinGraphCreateUpdateParameters = original.GremlinGraphCreateUpdateParameters
+type GremlinGraphCreateUpdateProperties = original.GremlinGraphCreateUpdateProperties
+type GremlinGraphGetProperties = original.GremlinGraphGetProperties
+type GremlinGraphGetResults = original.GremlinGraphGetResults
+type GremlinGraphListResult = original.GremlinGraphListResult
+type GremlinGraphResource = original.GremlinGraphResource
+type GremlinResourcesClient = original.GremlinResourcesClient
+type GremlinResourcesCreateUpdateGremlinDatabaseFuture = original.GremlinResourcesCreateUpdateGremlinDatabaseFuture
+type GremlinResourcesCreateUpdateGremlinGraphFuture = original.GremlinResourcesCreateUpdateGremlinGraphFuture
+type GremlinResourcesDeleteGremlinDatabaseFuture = original.GremlinResourcesDeleteGremlinDatabaseFuture
+type GremlinResourcesDeleteGremlinGraphFuture = original.GremlinResourcesDeleteGremlinGraphFuture
+type GremlinResourcesUpdateGremlinDatabaseThroughputFuture = original.GremlinResourcesUpdateGremlinDatabaseThroughputFuture
+type GremlinResourcesUpdateGremlinGraphThroughputFuture = original.GremlinResourcesUpdateGremlinGraphThroughputFuture
+type IncludedPath = original.IncludedPath
+type Indexes = original.Indexes
+type IndexingPolicy = original.IndexingPolicy
+type Location = original.Location
+type Metric = original.Metric
+type MetricAvailability = original.MetricAvailability
+type MetricDefinition = original.MetricDefinition
+type MetricDefinitionsListResult = original.MetricDefinitionsListResult
+type MetricListResult = original.MetricListResult
+type MetricName = original.MetricName
+type MetricValue = original.MetricValue
+type MongoDBCollectionCreateUpdateParameters = original.MongoDBCollectionCreateUpdateParameters
+type MongoDBCollectionCreateUpdateProperties = original.MongoDBCollectionCreateUpdateProperties
+type MongoDBCollectionGetProperties = original.MongoDBCollectionGetProperties
+type MongoDBCollectionGetResults = original.MongoDBCollectionGetResults
+type MongoDBCollectionListResult = original.MongoDBCollectionListResult
+type MongoDBCollectionResource = original.MongoDBCollectionResource
+type MongoDBDatabaseCreateUpdateParameters = original.MongoDBDatabaseCreateUpdateParameters
+type MongoDBDatabaseCreateUpdateProperties = original.MongoDBDatabaseCreateUpdateProperties
+type MongoDBDatabaseGetProperties = original.MongoDBDatabaseGetProperties
+type MongoDBDatabaseGetResults = original.MongoDBDatabaseGetResults
+type MongoDBDatabaseListResult = original.MongoDBDatabaseListResult
+type MongoDBDatabaseResource = original.MongoDBDatabaseResource
+type MongoDBResourcesClient = original.MongoDBResourcesClient
+type MongoDBResourcesCreateUpdateMongoDBCollectionFuture = original.MongoDBResourcesCreateUpdateMongoDBCollectionFuture
+type MongoDBResourcesCreateUpdateMongoDBDatabaseFuture = original.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture
+type MongoDBResourcesDeleteMongoDBCollectionFuture = original.MongoDBResourcesDeleteMongoDBCollectionFuture
+type MongoDBResourcesDeleteMongoDBDatabaseFuture = original.MongoDBResourcesDeleteMongoDBDatabaseFuture
+type MongoDBResourcesUpdateMongoDBCollectionThroughputFuture = original.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture
+type MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture = original.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture
+type MongoIndex = original.MongoIndex
+type MongoIndexKeys = original.MongoIndexKeys
+type MongoIndexOptions = original.MongoIndexOptions
+type Operation = original.Operation
+type OperationDisplay = original.OperationDisplay
+type OperationListResult = original.OperationListResult
+type OperationListResultIterator = original.OperationListResultIterator
+type OperationListResultPage = original.OperationListResultPage
+type OperationsClient = original.OperationsClient
+type PartitionKeyRangeIDClient = original.PartitionKeyRangeIDClient
+type PartitionKeyRangeIDRegionClient = original.PartitionKeyRangeIDRegionClient
+type PartitionMetric = original.PartitionMetric
+type PartitionMetricListResult = original.PartitionMetricListResult
+type PartitionUsage = original.PartitionUsage
+type PartitionUsagesResult = original.PartitionUsagesResult
+type PercentileClient = original.PercentileClient
+type PercentileMetric = original.PercentileMetric
+type PercentileMetricListResult = original.PercentileMetricListResult
+type PercentileMetricValue = original.PercentileMetricValue
+type PercentileSourceTargetClient = original.PercentileSourceTargetClient
+type PercentileTargetClient = original.PercentileTargetClient
+type PrivateEndpointConnection = original.PrivateEndpointConnection
+type PrivateEndpointConnectionListResult = original.PrivateEndpointConnectionListResult
+type PrivateEndpointConnectionProperties = original.PrivateEndpointConnectionProperties
+type PrivateEndpointConnectionsClient = original.PrivateEndpointConnectionsClient
+type PrivateEndpointConnectionsCreateOrUpdateFuture = original.PrivateEndpointConnectionsCreateOrUpdateFuture
+type PrivateEndpointConnectionsDeleteFuture = original.PrivateEndpointConnectionsDeleteFuture
+type PrivateEndpointProperty = original.PrivateEndpointProperty
+type PrivateLinkResource = original.PrivateLinkResource
+type PrivateLinkResourceListResult = original.PrivateLinkResourceListResult
+type PrivateLinkResourceProperties = original.PrivateLinkResourceProperties
+type PrivateLinkResourcesClient = original.PrivateLinkResourcesClient
+type PrivateLinkServiceConnectionStateProperty = original.PrivateLinkServiceConnectionStateProperty
+type ProxyResource = original.ProxyResource
+type RegionForOnlineOffline = original.RegionForOnlineOffline
+type Resource = original.Resource
+type SQLContainerCreateUpdateParameters = original.SQLContainerCreateUpdateParameters
+type SQLContainerCreateUpdateProperties = original.SQLContainerCreateUpdateProperties
+type SQLContainerGetProperties = original.SQLContainerGetProperties
+type SQLContainerGetResults = original.SQLContainerGetResults
+type SQLContainerListResult = original.SQLContainerListResult
+type SQLContainerResource = original.SQLContainerResource
+type SQLDatabaseCreateUpdateParameters = original.SQLDatabaseCreateUpdateParameters
+type SQLDatabaseCreateUpdateProperties = original.SQLDatabaseCreateUpdateProperties
+type SQLDatabaseGetProperties = original.SQLDatabaseGetProperties
+type SQLDatabaseGetResults = original.SQLDatabaseGetResults
+type SQLDatabaseListResult = original.SQLDatabaseListResult
+type SQLDatabaseResource = original.SQLDatabaseResource
+type SQLResourcesClient = original.SQLResourcesClient
+type SQLResourcesCreateUpdateSQLContainerFuture = original.SQLResourcesCreateUpdateSQLContainerFuture
+type SQLResourcesCreateUpdateSQLDatabaseFuture = original.SQLResourcesCreateUpdateSQLDatabaseFuture
+type SQLResourcesCreateUpdateSQLStoredProcedureFuture = original.SQLResourcesCreateUpdateSQLStoredProcedureFuture
+type SQLResourcesCreateUpdateSQLTriggerFuture = original.SQLResourcesCreateUpdateSQLTriggerFuture
+type SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture = original.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture
+type SQLResourcesDeleteSQLContainerFuture = original.SQLResourcesDeleteSQLContainerFuture
+type SQLResourcesDeleteSQLDatabaseFuture = original.SQLResourcesDeleteSQLDatabaseFuture
+type SQLResourcesDeleteSQLStoredProcedureFuture = original.SQLResourcesDeleteSQLStoredProcedureFuture
+type SQLResourcesDeleteSQLTriggerFuture = original.SQLResourcesDeleteSQLTriggerFuture
+type SQLResourcesDeleteSQLUserDefinedFunctionFuture = original.SQLResourcesDeleteSQLUserDefinedFunctionFuture
+type SQLResourcesUpdateSQLContainerThroughputFuture = original.SQLResourcesUpdateSQLContainerThroughputFuture
+type SQLResourcesUpdateSQLDatabaseThroughputFuture = original.SQLResourcesUpdateSQLDatabaseThroughputFuture
+type SQLStoredProcedureCreateUpdateParameters = original.SQLStoredProcedureCreateUpdateParameters
+type SQLStoredProcedureCreateUpdateProperties = original.SQLStoredProcedureCreateUpdateProperties
+type SQLStoredProcedureGetProperties = original.SQLStoredProcedureGetProperties
+type SQLStoredProcedureGetResults = original.SQLStoredProcedureGetResults
+type SQLStoredProcedureListResult = original.SQLStoredProcedureListResult
+type SQLStoredProcedureResource = original.SQLStoredProcedureResource
+type SQLTriggerCreateUpdateParameters = original.SQLTriggerCreateUpdateParameters
+type SQLTriggerCreateUpdateProperties = original.SQLTriggerCreateUpdateProperties
+type SQLTriggerGetProperties = original.SQLTriggerGetProperties
+type SQLTriggerGetResults = original.SQLTriggerGetResults
+type SQLTriggerListResult = original.SQLTriggerListResult
+type SQLTriggerResource = original.SQLTriggerResource
+type SQLUserDefinedFunctionCreateUpdateParameters = original.SQLUserDefinedFunctionCreateUpdateParameters
+type SQLUserDefinedFunctionCreateUpdateProperties = original.SQLUserDefinedFunctionCreateUpdateProperties
+type SQLUserDefinedFunctionGetProperties = original.SQLUserDefinedFunctionGetProperties
+type SQLUserDefinedFunctionGetResults = original.SQLUserDefinedFunctionGetResults
+type SQLUserDefinedFunctionListResult = original.SQLUserDefinedFunctionListResult
+type SQLUserDefinedFunctionResource = original.SQLUserDefinedFunctionResource
+type TableCreateUpdateParameters = original.TableCreateUpdateParameters
+type TableCreateUpdateProperties = original.TableCreateUpdateProperties
+type TableGetProperties = original.TableGetProperties
+type TableGetResults = original.TableGetResults
+type TableListResult = original.TableListResult
+type TableResource = original.TableResource
+type TableResourcesClient = original.TableResourcesClient
+type TableResourcesCreateUpdateTableFuture = original.TableResourcesCreateUpdateTableFuture
+type TableResourcesDeleteTableFuture = original.TableResourcesDeleteTableFuture
+type TableResourcesUpdateTableThroughputFuture = original.TableResourcesUpdateTableThroughputFuture
+type ThroughputSettingsGetProperties = original.ThroughputSettingsGetProperties
+type ThroughputSettingsGetResults = original.ThroughputSettingsGetResults
+type ThroughputSettingsResource = original.ThroughputSettingsResource
+type ThroughputSettingsUpdateParameters = original.ThroughputSettingsUpdateParameters
+type ThroughputSettingsUpdateProperties = original.ThroughputSettingsUpdateProperties
+type TrackedResource = original.TrackedResource
+type UniqueKey = original.UniqueKey
+type UniqueKeyPolicy = original.UniqueKeyPolicy
+type Usage = original.Usage
+type UsagesResult = original.UsagesResult
+type VirtualNetworkRule = original.VirtualNetworkRule
+
+func New(subscriptionID string, subscriptionID1 string) BaseClient {
+ return original.New(subscriptionID, subscriptionID1)
+}
+func NewCassandraResourcesClient(subscriptionID string, subscriptionID1 string) CassandraResourcesClient {
+ return original.NewCassandraResourcesClient(subscriptionID, subscriptionID1)
+}
+func NewCassandraResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CassandraResourcesClient {
+ return original.NewCassandraResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewCollectionClient(subscriptionID string, subscriptionID1 string) CollectionClient {
+ return original.NewCollectionClient(subscriptionID, subscriptionID1)
+}
+func NewCollectionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionClient {
+ return original.NewCollectionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewCollectionPartitionClient(subscriptionID string, subscriptionID1 string) CollectionPartitionClient {
+ return original.NewCollectionPartitionClient(subscriptionID, subscriptionID1)
+}
+func NewCollectionPartitionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionPartitionClient {
+ return original.NewCollectionPartitionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewCollectionPartitionRegionClient(subscriptionID string, subscriptionID1 string) CollectionPartitionRegionClient {
+ return original.NewCollectionPartitionRegionClient(subscriptionID, subscriptionID1)
+}
+func NewCollectionPartitionRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionPartitionRegionClient {
+ return original.NewCollectionPartitionRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewCollectionRegionClient(subscriptionID string, subscriptionID1 string) CollectionRegionClient {
+ return original.NewCollectionRegionClient(subscriptionID, subscriptionID1)
+}
+func NewCollectionRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionRegionClient {
+ return original.NewCollectionRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewDatabaseAccountRegionClient(subscriptionID string, subscriptionID1 string) DatabaseAccountRegionClient {
+ return original.NewDatabaseAccountRegionClient(subscriptionID, subscriptionID1)
+}
+func NewDatabaseAccountRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseAccountRegionClient {
+ return original.NewDatabaseAccountRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewDatabaseAccountsClient(subscriptionID string, subscriptionID1 string) DatabaseAccountsClient {
+ return original.NewDatabaseAccountsClient(subscriptionID, subscriptionID1)
+}
+func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseAccountsClient {
+ return original.NewDatabaseAccountsClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewDatabaseClient(subscriptionID string, subscriptionID1 string) DatabaseClient {
+ return original.NewDatabaseClient(subscriptionID, subscriptionID1)
+}
+func NewDatabaseClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseClient {
+ return original.NewDatabaseClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewGremlinResourcesClient(subscriptionID string, subscriptionID1 string) GremlinResourcesClient {
+ return original.NewGremlinResourcesClient(subscriptionID, subscriptionID1)
+}
+func NewGremlinResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) GremlinResourcesClient {
+ return original.NewGremlinResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewMongoDBResourcesClient(subscriptionID string, subscriptionID1 string) MongoDBResourcesClient {
+ return original.NewMongoDBResourcesClient(subscriptionID, subscriptionID1)
+}
+func NewMongoDBResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) MongoDBResourcesClient {
+ return original.NewMongoDBResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return original.NewOperationListResultIterator(page)
+}
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return original.NewOperationListResultPage(getNextPage)
+}
+func NewOperationsClient(subscriptionID string, subscriptionID1 string) OperationsClient {
+ return original.NewOperationsClient(subscriptionID, subscriptionID1)
+}
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewPartitionKeyRangeIDClient(subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDClient {
+ return original.NewPartitionKeyRangeIDClient(subscriptionID, subscriptionID1)
+}
+func NewPartitionKeyRangeIDClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDClient {
+ return original.NewPartitionKeyRangeIDClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewPartitionKeyRangeIDRegionClient(subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDRegionClient {
+ return original.NewPartitionKeyRangeIDRegionClient(subscriptionID, subscriptionID1)
+}
+func NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDRegionClient {
+ return original.NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewPercentileClient(subscriptionID string, subscriptionID1 string) PercentileClient {
+ return original.NewPercentileClient(subscriptionID, subscriptionID1)
+}
+func NewPercentileClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileClient {
+ return original.NewPercentileClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewPercentileSourceTargetClient(subscriptionID string, subscriptionID1 string) PercentileSourceTargetClient {
+ return original.NewPercentileSourceTargetClient(subscriptionID, subscriptionID1)
+}
+func NewPercentileSourceTargetClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileSourceTargetClient {
+ return original.NewPercentileSourceTargetClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewPercentileTargetClient(subscriptionID string, subscriptionID1 string) PercentileTargetClient {
+ return original.NewPercentileTargetClient(subscriptionID, subscriptionID1)
+}
+func NewPercentileTargetClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileTargetClient {
+ return original.NewPercentileTargetClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewPrivateEndpointConnectionsClient(subscriptionID string, subscriptionID1 string) PrivateEndpointConnectionsClient {
+ return original.NewPrivateEndpointConnectionsClient(subscriptionID, subscriptionID1)
+}
+func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PrivateEndpointConnectionsClient {
+ return original.NewPrivateEndpointConnectionsClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewPrivateLinkResourcesClient(subscriptionID string, subscriptionID1 string) PrivateLinkResourcesClient {
+ return original.NewPrivateLinkResourcesClient(subscriptionID, subscriptionID1)
+}
+func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PrivateLinkResourcesClient {
+ return original.NewPrivateLinkResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewSQLResourcesClient(subscriptionID string, subscriptionID1 string) SQLResourcesClient {
+ return original.NewSQLResourcesClient(subscriptionID, subscriptionID1)
+}
+func NewSQLResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) SQLResourcesClient {
+ return original.NewSQLResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewTableResourcesClient(subscriptionID string, subscriptionID1 string) TableResourcesClient {
+ return original.NewTableResourcesClient(subscriptionID, subscriptionID1)
+}
+func NewTableResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) TableResourcesClient {
+ return original.NewTableResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func NewWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) BaseClient {
+ return original.NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)
+}
+func PossibleConflictResolutionModeValues() []ConflictResolutionMode {
+ return original.PossibleConflictResolutionModeValues()
+}
+func PossibleConnectorOfferValues() []ConnectorOffer {
+ return original.PossibleConnectorOfferValues()
+}
+func PossibleDataTypeValues() []DataType {
+ return original.PossibleDataTypeValues()
+}
+func PossibleDatabaseAccountKindValues() []DatabaseAccountKind {
+ return original.PossibleDatabaseAccountKindValues()
+}
+func PossibleDatabaseAccountOfferTypeValues() []DatabaseAccountOfferType {
+ return original.PossibleDatabaseAccountOfferTypeValues()
+}
+func PossibleDefaultConsistencyLevelValues() []DefaultConsistencyLevel {
+ return original.PossibleDefaultConsistencyLevelValues()
+}
+func PossibleIndexKindValues() []IndexKind {
+ return original.PossibleIndexKindValues()
+}
+func PossibleIndexingModeValues() []IndexingMode {
+ return original.PossibleIndexingModeValues()
+}
+func PossibleKeyKindValues() []KeyKind {
+ return original.PossibleKeyKindValues()
+}
+func PossiblePartitionKindValues() []PartitionKind {
+ return original.PossiblePartitionKindValues()
+}
+func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType {
+ return original.PossiblePrimaryAggregationTypeValues()
+}
+func PossibleTriggerOperationValues() []TriggerOperation {
+ return original.PossibleTriggerOperationValues()
+}
+func PossibleTriggerTypeValues() []TriggerType {
+ return original.PossibleTriggerTypeValues()
+}
+func PossibleUnitTypeValues() []UnitType {
+ return original.PossibleUnitTypeValues()
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/preview"
+}
+func Version() string {
+ return original.Version()
+}
diff --git a/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go b/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go
index 9c3bafe16ebf..79c196a30907 100644
--- a/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go
+++ b/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go
@@ -50,6 +50,7 @@ const (
type HanaInstanceSizeNamesEnum = original.HanaInstanceSizeNamesEnum
const (
+ S112 HanaInstanceSizeNamesEnum = original.S112
S144 HanaInstanceSizeNamesEnum = original.S144
S144m HanaInstanceSizeNamesEnum = original.S144m
S192 HanaInstanceSizeNamesEnum = original.S192
@@ -58,6 +59,9 @@ const (
S224m HanaInstanceSizeNamesEnum = original.S224m
S224o HanaInstanceSizeNamesEnum = original.S224o
S224om HanaInstanceSizeNamesEnum = original.S224om
+ S224oo HanaInstanceSizeNamesEnum = original.S224oo
+ S224oom HanaInstanceSizeNamesEnum = original.S224oom
+ S224ooo HanaInstanceSizeNamesEnum = original.S224ooo
S224oxm HanaInstanceSizeNamesEnum = original.S224oxm
S224oxxm HanaInstanceSizeNamesEnum = original.S224oxxm
S384 HanaInstanceSizeNamesEnum = original.S384
diff --git a/profiles/preview/preview/resources/mgmt/managementgroups/managementgroupsapi/models.go b/profiles/preview/preview/resources/mgmt/managementgroups/managementgroupsapi/models.go
index bc4208e24c23..80a6e0d0d215 100644
--- a/profiles/preview/preview/resources/mgmt/managementgroups/managementgroupsapi/models.go
+++ b/profiles/preview/preview/resources/mgmt/managementgroups/managementgroupsapi/models.go
@@ -19,7 +19,7 @@
package managementgroupsapi
-import original "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroupsapi"
+import original "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroupsapi"
type BaseClientAPI = original.BaseClientAPI
type ClientAPI = original.ClientAPI
diff --git a/profiles/preview/preview/resources/mgmt/managementgroups/models.go b/profiles/preview/preview/resources/mgmt/managementgroups/models.go
index 3c47cc3cacc3..8c750886b270 100644
--- a/profiles/preview/preview/resources/mgmt/managementgroups/models.go
+++ b/profiles/preview/preview/resources/mgmt/managementgroups/models.go
@@ -22,7 +22,7 @@ package managementgroups
import (
"context"
- original "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups"
+ original "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2019-11-01/managementgroups"
)
const (
@@ -56,12 +56,6 @@ const (
Permissions1View Permissions1 = original.Permissions1View
)
-type ProvisioningState = original.ProvisioningState
-
-const (
- Updating ProvisioningState = original.Updating
-)
-
type Reason = original.Reason
const (
@@ -83,21 +77,21 @@ const (
type Type = original.Type
const (
- ProvidersMicrosoftManagementmanagementGroups Type = original.ProvidersMicrosoftManagementmanagementGroups
+ MicrosoftManagementmanagementGroups Type = original.MicrosoftManagementmanagementGroups
)
type Type1 = original.Type1
const (
- Type1ProvidersMicrosoftManagementmanagementGroups Type1 = original.Type1ProvidersMicrosoftManagementmanagementGroups
- Type1Subscriptions Type1 = original.Type1Subscriptions
+ Type1MicrosoftManagementmanagementGroups Type1 = original.Type1MicrosoftManagementmanagementGroups
+ Type1Subscriptions Type1 = original.Type1Subscriptions
)
type Type2 = original.Type2
const (
- Type2ProvidersMicrosoftManagementmanagementGroups Type2 = original.Type2ProvidersMicrosoftManagementmanagementGroups
- Type2Subscriptions Type2 = original.Type2Subscriptions
+ Type2MicrosoftManagementmanagementGroups Type2 = original.Type2MicrosoftManagementmanagementGroups
+ Type2Subscriptions Type2 = original.Type2Subscriptions
)
type BaseClient = original.BaseClient
@@ -142,10 +136,10 @@ type OperationListResult = original.OperationListResult
type OperationListResultIterator = original.OperationListResultIterator
type OperationListResultPage = original.OperationListResultPage
type OperationResults = original.OperationResults
-type OperationResultsProperties = original.OperationResultsProperties
type OperationsClient = original.OperationsClient
type ParentGroupInfo = original.ParentGroupInfo
type PatchManagementGroupRequest = original.PatchManagementGroupRequest
+type PathElement = original.PathElement
type Properties = original.Properties
type SetObject = original.SetObject
type SubscriptionsClient = original.SubscriptionsClient
@@ -214,9 +208,6 @@ func PossiblePermissions1Values() []Permissions1 {
func PossiblePermissionsValues() []Permissions {
return original.PossiblePermissionsValues()
}
-func PossibleProvisioningStateValues() []ProvisioningState {
- return original.PossibleProvisioningStateValues()
-}
func PossibleReasonValues() []Reason {
return original.PossibleReasonValues()
}
diff --git a/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go b/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go
index 600b5eef0a5d..d2886b9dfefe 100644
--- a/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go
+++ b/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go
@@ -312,6 +312,7 @@ const (
AzureActiveDirectoryIdentityProtection MicrosoftSecurityProductName = original.AzureActiveDirectoryIdentityProtection
AzureAdvancedThreatProtection MicrosoftSecurityProductName = original.AzureAdvancedThreatProtection
AzureSecurityCenter MicrosoftSecurityProductName = original.AzureSecurityCenter
+ AzureSecurityCenterforIoT MicrosoftSecurityProductName = original.AzureSecurityCenterforIoT
MicrosoftCloudAppSecurity MicrosoftSecurityProductName = original.MicrosoftCloudAppSecurity
)
diff --git a/profiles/preview/preview/sql/mgmt/sql/models.go b/profiles/preview/preview/sql/mgmt/sql/models.go
index 06ea636d3fe2..487de81e36f6 100644
--- a/profiles/preview/preview/sql/mgmt/sql/models.go
+++ b/profiles/preview/preview/sql/mgmt/sql/models.go
@@ -92,6 +92,13 @@ const (
ManagedServerCreateModePointInTimeRestore ManagedServerCreateMode = original.ManagedServerCreateModePointInTimeRestore
)
+type ReplicaType = original.ReplicaType
+
+const (
+ Primary ReplicaType = original.Primary
+ ReadableSecondary ReplicaType = original.ReadableSecondary
+)
+
type SecurityAlertPolicyState = original.SecurityAlertPolicyState
const (
@@ -350,6 +357,9 @@ func PossibleManagedInstanceProxyOverrideValues() []ManagedInstanceProxyOverride
func PossibleManagedServerCreateModeValues() []ManagedServerCreateMode {
return original.PossibleManagedServerCreateModeValues()
}
+func PossibleReplicaTypeValues() []ReplicaType {
+ return original.PossibleReplicaTypeValues()
+}
func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState {
return original.PossibleSecurityAlertPolicyStateValues()
}
diff --git a/profiles/preview/preview/timeseriesinsights/mgmt/timeseriesinsights/models.go b/profiles/preview/preview/timeseriesinsights/mgmt/timeseriesinsights/models.go
index 4e0f439b239d..190cf7e8450a 100644
--- a/profiles/preview/preview/timeseriesinsights/mgmt/timeseriesinsights/models.go
+++ b/profiles/preview/preview/timeseriesinsights/mgmt/timeseriesinsights/models.go
@@ -123,6 +123,7 @@ type SkuName = original.SkuName
const (
L1 SkuName = original.L1
+ P1 SkuName = original.P1
S1 SkuName = original.S1
S2 SkuName = original.S2
)
@@ -134,6 +135,14 @@ const (
PurgeOldData StorageLimitExceededBehavior = original.PurgeOldData
)
+type WarmStoragePropertiesState = original.WarmStoragePropertiesState
+
+const (
+ WarmStoragePropertiesStateError WarmStoragePropertiesState = original.WarmStoragePropertiesStateError
+ WarmStoragePropertiesStateOk WarmStoragePropertiesState = original.WarmStoragePropertiesStateOk
+ WarmStoragePropertiesStateUnknown WarmStoragePropertiesState = original.WarmStoragePropertiesStateUnknown
+)
+
type AccessPoliciesClient = original.AccessPoliciesClient
type AccessPolicyCreateOrUpdateParameters = original.AccessPolicyCreateOrUpdateParameters
type AccessPolicyListResponse = original.AccessPolicyListResponse
@@ -220,6 +229,10 @@ type StandardEnvironmentResourceProperties = original.StandardEnvironmentResourc
type StandardEnvironmentUpdateParameters = original.StandardEnvironmentUpdateParameters
type TimeSeriesIDProperty = original.TimeSeriesIDProperty
type TrackedResource = original.TrackedResource
+type WarmStorageEnvironmentStatus = original.WarmStorageEnvironmentStatus
+type WarmStoragePropertiesUsage = original.WarmStoragePropertiesUsage
+type WarmStoragePropertiesUsageStateDetails = original.WarmStoragePropertiesUsageStateDetails
+type WarmStoreConfigurationProperties = original.WarmStoreConfigurationProperties
func New(subscriptionID string) BaseClient {
return original.New(subscriptionID)
@@ -302,6 +315,9 @@ func PossibleSkuNameValues() []SkuName {
func PossibleStorageLimitExceededBehaviorValues() []StorageLimitExceededBehavior {
return original.PossibleStorageLimitExceededBehaviorValues()
}
+func PossibleWarmStoragePropertiesStateValues() []WarmStoragePropertiesState {
+ return original.PossibleWarmStoragePropertiesStateValues()
+}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
}
diff --git a/profiles/preview/resources/mgmt/policy/models.go b/profiles/preview/resources/mgmt/policy/models.go
index 8827d97f90d7..e2ece98125d5 100644
--- a/profiles/preview/resources/mgmt/policy/models.go
+++ b/profiles/preview/resources/mgmt/policy/models.go
@@ -22,7 +22,7 @@ package policy
import (
"context"
- original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/policy"
+ original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-09-01/policy"
)
const (
@@ -36,6 +36,18 @@ const (
DoNotEnforce EnforcementMode = original.DoNotEnforce
)
+type ParameterType = original.ParameterType
+
+const (
+ Array ParameterType = original.Array
+ Boolean ParameterType = original.Boolean
+ DateTime ParameterType = original.DateTime
+ Float ParameterType = original.Float
+ Integer ParameterType = original.Integer
+ Object ParameterType = original.Object
+ String ParameterType = original.String
+)
+
type ResourceIdentityType = original.ResourceIdentityType
const (
@@ -49,6 +61,7 @@ const (
BuiltIn Type = original.BuiltIn
Custom Type = original.Custom
NotSpecified Type = original.NotSpecified
+ Static Type = original.Static
)
type Assignment = original.Assignment
@@ -58,15 +71,21 @@ type AssignmentListResultPage = original.AssignmentListResultPage
type AssignmentProperties = original.AssignmentProperties
type AssignmentsClient = original.AssignmentsClient
type BaseClient = original.BaseClient
+type CloudError = original.CloudError
type Definition = original.Definition
+type DefinitionGroup = original.DefinitionGroup
type DefinitionListResult = original.DefinitionListResult
type DefinitionListResultIterator = original.DefinitionListResultIterator
type DefinitionListResultPage = original.DefinitionListResultPage
type DefinitionProperties = original.DefinitionProperties
type DefinitionReference = original.DefinitionReference
type DefinitionsClient = original.DefinitionsClient
+type ErrorAdditionalInfo = original.ErrorAdditionalInfo
type ErrorResponse = original.ErrorResponse
type Identity = original.Identity
+type ParameterDefinitionsValue = original.ParameterDefinitionsValue
+type ParameterDefinitionsValueMetadata = original.ParameterDefinitionsValueMetadata
+type ParameterValuesValue = original.ParameterValuesValue
type SetDefinition = original.SetDefinition
type SetDefinitionListResult = original.SetDefinitionListResult
type SetDefinitionListResultIterator = original.SetDefinitionListResultIterator
@@ -120,6 +139,9 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
func PossibleEnforcementModeValues() []EnforcementMode {
return original.PossibleEnforcementModeValues()
}
+func PossibleParameterTypeValues() []ParameterType {
+ return original.PossibleParameterTypeValues()
+}
func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
return original.PossibleResourceIdentityTypeValues()
}
diff --git a/profiles/preview/resources/mgmt/policy/policyapi/models.go b/profiles/preview/resources/mgmt/policy/policyapi/models.go
index be7cec1ae017..c57141c7a2f4 100644
--- a/profiles/preview/resources/mgmt/policy/policyapi/models.go
+++ b/profiles/preview/resources/mgmt/policy/policyapi/models.go
@@ -19,7 +19,7 @@
package policyapi
-import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/policy/policyapi"
+import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-09-01/policy/policyapi"
type AssignmentsClientAPI = original.AssignmentsClientAPI
type DefinitionsClientAPI = original.DefinitionsClientAPI
diff --git a/profiles/preview/serialconsole/mgmt/serialconsole/models.go b/profiles/preview/serialconsole/mgmt/serialconsole/models.go
index 7ef307a409a5..e42c52fc959f 100644
--- a/profiles/preview/serialconsole/mgmt/serialconsole/models.go
+++ b/profiles/preview/serialconsole/mgmt/serialconsole/models.go
@@ -26,36 +26,18 @@ const (
)
type BaseClient = original.BaseClient
-type ConsoleClient = original.ConsoleClient
-type DeploymentValidateResult = original.DeploymentValidateResult
-type GetDisabledResult = original.GetDisabledResult
-type GetResult = original.GetResult
-type ListClient = original.ListClient
-type ListConsoleClient = original.ListConsoleClient
+type DisableSerialConsoleResult = original.DisableSerialConsoleResult
+type EnableSerialConsoleResult = original.EnableSerialConsoleResult
+type GetSerialConsoleSubscriptionNotFound = original.GetSerialConsoleSubscriptionNotFound
type Operations = original.Operations
-type SetDisabledResult = original.SetDisabledResult
+type OperationsValueItem = original.OperationsValueItem
+type OperationsValueItemDisplay = original.OperationsValueItemDisplay
+type SetObject = original.SetObject
+type Status = original.Status
func New(subscriptionID string) BaseClient {
return original.New(subscriptionID)
}
-func NewConsoleClient(subscriptionID string) ConsoleClient {
- return original.NewConsoleClient(subscriptionID)
-}
-func NewConsoleClientWithBaseURI(baseURI string, subscriptionID string) ConsoleClient {
- return original.NewConsoleClientWithBaseURI(baseURI, subscriptionID)
-}
-func NewListClient(subscriptionID string) ListClient {
- return original.NewListClient(subscriptionID)
-}
-func NewListClientWithBaseURI(baseURI string, subscriptionID string) ListClient {
- return original.NewListClientWithBaseURI(baseURI, subscriptionID)
-}
-func NewListConsoleClient(subscriptionID string) ListConsoleClient {
- return original.NewListConsoleClient(subscriptionID)
-}
-func NewListConsoleClientWithBaseURI(baseURI string, subscriptionID string) ListConsoleClient {
- return original.NewListConsoleClientWithBaseURI(baseURI, subscriptionID)
-}
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
diff --git a/profiles/preview/serialconsole/mgmt/serialconsole/serialconsoleapi/models.go b/profiles/preview/serialconsole/mgmt/serialconsole/serialconsoleapi/models.go
index 1d3c2872f688..713d3c085568 100644
--- a/profiles/preview/serialconsole/mgmt/serialconsole/serialconsoleapi/models.go
+++ b/profiles/preview/serialconsole/mgmt/serialconsole/serialconsoleapi/models.go
@@ -21,6 +21,4 @@ package serialconsoleapi
import original "github.com/Azure/azure-sdk-for-go/services/serialconsole/mgmt/2018-05-01/serialconsole/serialconsoleapi"
-type ConsoleClientAPI = original.ConsoleClientAPI
-type ListClientAPI = original.ListClientAPI
-type ListConsoleClientAPI = original.ListConsoleClientAPI
+type BaseClientAPI = original.BaseClientAPI
diff --git a/profiles/preview/signalr/mgmt/signalr/models.go b/profiles/preview/signalr/mgmt/signalr/models.go
index 2e63915998b2..f3cacdeab936 100644
--- a/profiles/preview/signalr/mgmt/signalr/models.go
+++ b/profiles/preview/signalr/mgmt/signalr/models.go
@@ -29,6 +29,13 @@ const (
DefaultBaseURI = original.DefaultBaseURI
)
+type FeatureFlags = original.FeatureFlags
+
+const (
+ EnableConnectivityLogs FeatureFlags = original.EnableConnectivityLogs
+ ServiceMode FeatureFlags = original.ServiceMode
+)
+
type KeyType = original.KeyType
const (
@@ -67,8 +74,11 @@ type CreateOrUpdateProperties = original.CreateOrUpdateProperties
type CreateParameters = original.CreateParameters
type DeleteFuture = original.DeleteFuture
type Dimension = original.Dimension
+type ErrorResponse = original.ErrorResponse
+type ErrorResponseBody = original.ErrorResponseBody
type Feature = original.Feature
type Keys = original.Keys
+type LogSpecification = original.LogSpecification
type MetricSpecification = original.MetricSpecification
type NameAvailability = original.NameAvailability
type NameAvailabilityParameters = original.NameAvailabilityParameters
@@ -142,6 +152,9 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
+func PossibleFeatureFlagsValues() []FeatureFlags {
+ return original.PossibleFeatureFlagsValues()
+}
func PossibleKeyTypeValues() []KeyType {
return original.PossibleKeyTypeValues()
}
diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/models.go b/services/datafactory/mgmt/2018-06-01/datafactory/models.go
index 210e26dfdf33..ee51b42532a7 100644
--- a/services/datafactory/mgmt/2018-06-01/datafactory/models.go
+++ b/services/datafactory/mgmt/2018-06-01/datafactory/models.go
@@ -1256,13 +1256,15 @@ type SsisPackageLocationType string
const (
// File ...
File SsisPackageLocationType = "File"
+ // InlinePackage ...
+ InlinePackage SsisPackageLocationType = "InlinePackage"
// SSISDB ...
SSISDB SsisPackageLocationType = "SSISDB"
)
// PossibleSsisPackageLocationTypeValues returns an array of possible values for the SsisPackageLocationType const type.
func PossibleSsisPackageLocationTypeValues() []SsisPackageLocationType {
- return []SsisPackageLocationType{File, SSISDB}
+ return []SsisPackageLocationType{File, InlinePackage, SSISDB}
}
// StoredProcedureParameterType enumerates the values for stored procedure parameter type.
@@ -202593,6 +202595,18 @@ func (sac *SSISAccessCredential) UnmarshalJSON(body []byte) error {
return nil
}
+// SSISChildPackage SSIS embedded child package.
+type SSISChildPackage struct {
+ // PackagePath - Path for embedded child package. Type: string (or Expression with resultType string).
+ PackagePath interface{} `json:"packagePath,omitempty"`
+ // PackageName - Name for embedded child package.
+ PackageName *string `json:"packageName,omitempty"`
+ // PackageContent - Content for embedded child package. Type: string (or Expression with resultType string).
+ PackageContent interface{} `json:"packageContent,omitempty"`
+ // PackageLastModifiedDate - Last modified date for embedded child package.
+ PackageLastModifiedDate *string `json:"packageLastModifiedDate,omitempty"`
+}
+
// SsisEnvironment ssis environment.
type SsisEnvironment struct {
// FolderID - Folder id which contains environment.
@@ -203086,7 +203100,7 @@ func (sp SsisPackage) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool
type SSISPackageLocation struct {
// PackagePath - The SSIS package path. Type: string (or Expression with resultType string).
PackagePath interface{} `json:"packagePath,omitempty"`
- // Type - The type of SSIS package location. Possible values include: 'SSISDB', 'File'
+ // Type - The type of SSIS package location. Possible values include: 'SSISDB', 'File', 'InlinePackage'
Type SsisPackageLocationType `json:"type,omitempty"`
// SSISPackageLocationTypeProperties - SSIS package location properties.
*SSISPackageLocationTypeProperties `json:"typeProperties,omitempty"`
@@ -203157,6 +203171,14 @@ type SSISPackageLocationTypeProperties struct {
AccessCredential *SSISAccessCredential `json:"accessCredential,omitempty"`
// ConfigurationPath - The configuration file of the package execution. Type: string (or Expression with resultType string).
ConfigurationPath interface{} `json:"configurationPath,omitempty"`
+ // PackageName - The package name.
+ PackageName *string `json:"packageName,omitempty"`
+ // PackageContent - The embedded package content. Type: string (or Expression with resultType string).
+ PackageContent interface{} `json:"packageContent,omitempty"`
+ // PackageLastModifiedDate - The embedded package last modified date.
+ PackageLastModifiedDate *string `json:"packageLastModifiedDate,omitempty"`
+ // ChildPackages - The embedded child package list.
+ ChildPackages *[]SSISChildPackage `json:"childPackages,omitempty"`
}
// UnmarshalJSON is the custom unmarshaler for SSISPackageLocationTypeProperties struct.
@@ -203194,6 +203216,42 @@ func (spltp *SSISPackageLocationTypeProperties) UnmarshalJSON(body []byte) error
}
spltp.ConfigurationPath = configurationPath
}
+ case "packageName":
+ if v != nil {
+ var packageName string
+ err = json.Unmarshal(*v, &packageName)
+ if err != nil {
+ return err
+ }
+ spltp.PackageName = &packageName
+ }
+ case "packageContent":
+ if v != nil {
+ var packageContent interface{}
+ err = json.Unmarshal(*v, &packageContent)
+ if err != nil {
+ return err
+ }
+ spltp.PackageContent = packageContent
+ }
+ case "packageLastModifiedDate":
+ if v != nil {
+ var packageLastModifiedDate string
+ err = json.Unmarshal(*v, &packageLastModifiedDate)
+ if err != nil {
+ return err
+ }
+ spltp.PackageLastModifiedDate = &packageLastModifiedDate
+ }
+ case "childPackages":
+ if v != nil {
+ var childPackages []SSISChildPackage
+ err = json.Unmarshal(*v, &childPackages)
+ if err != nil {
+ return err
+ }
+ spltp.ChildPackages = &childPackages
+ }
}
}
@@ -213609,6 +213667,8 @@ type WebActivityTypeProperties struct {
Datasets *[]DatasetReference `json:"datasets,omitempty"`
// LinkedServices - List of linked services passed to web endpoint.
LinkedServices *[]LinkedServiceReference `json:"linkedServices,omitempty"`
+ // ConnectVia - The integration runtime reference.
+ ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"`
}
// WebAnonymousAuthentication a WebLinkedService that uses anonymous authentication to communicate with an
diff --git a/services/machinelearning/mgmt/2019-10-01/workspaces/client.go b/services/machinelearning/mgmt/2019-10-01/workspaces/client.go
new file mode 100644
index 000000000000..6cb66b287a0c
--- /dev/null
+++ b/services/machinelearning/mgmt/2019-10-01/workspaces/client.go
@@ -0,0 +1,52 @@
+// Package workspaces implements the Azure ARM Workspaces service API version 2019-10-01.
+//
+// These APIs allow end users to operate on Azure Machine Learning Workspace resources. They support CRUD operations
+// for Azure Machine Learning Workspaces.
+package workspaces
+
+// 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 (
+ "github.com/Azure/go-autorest/autorest"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Workspaces
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Workspaces.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/services/machinelearning/mgmt/2019-10-01/workspaces/models.go b/services/machinelearning/mgmt/2019-10-01/workspaces/models.go
new file mode 100644
index 000000000000..eeaf1a59790f
--- /dev/null
+++ b/services/machinelearning/mgmt/2019-10-01/workspaces/models.go
@@ -0,0 +1,503 @@
+package workspaces
+
+// 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"
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2019-10-01/workspaces"
+
+// State enumerates the values for state.
+type State string
+
+const (
+ // Deleted ...
+ Deleted State = "Deleted"
+ // Disabled ...
+ Disabled State = "Disabled"
+ // Enabled ...
+ Enabled State = "Enabled"
+ // Migrated ...
+ Migrated State = "Migrated"
+ // Registered ...
+ Registered State = "Registered"
+ // Unregistered ...
+ Unregistered State = "Unregistered"
+ // Updated ...
+ Updated State = "Updated"
+)
+
+// PossibleStateValues returns an array of possible values for the State const type.
+func PossibleStateValues() []State {
+ return []State{Deleted, Disabled, Enabled, Migrated, Registered, Unregistered, Updated}
+}
+
+// WorkspaceType enumerates the values for workspace type.
+type WorkspaceType string
+
+const (
+ // Anonymous ...
+ Anonymous WorkspaceType = "Anonymous"
+ // Free ...
+ Free WorkspaceType = "Free"
+ // PaidPremium ...
+ PaidPremium WorkspaceType = "PaidPremium"
+ // PaidStandard ...
+ PaidStandard WorkspaceType = "PaidStandard"
+ // Production ...
+ Production WorkspaceType = "Production"
+)
+
+// PossibleWorkspaceTypeValues returns an array of possible values for the WorkspaceType const type.
+func PossibleWorkspaceTypeValues() []WorkspaceType {
+ return []WorkspaceType{Anonymous, Free, PaidPremium, PaidStandard, Production}
+}
+
+// ErrorResponse the error response send when an operation fails.
+type ErrorResponse struct {
+ // Code - error code
+ Code *string `json:"code,omitempty"`
+ // Message - error message
+ Message *string `json:"message,omitempty"`
+}
+
+// KeysResponse workspace authorization keys for a workspace.
+type KeysResponse struct {
+ autorest.Response `json:"-"`
+ // PrimaryToken - Primary authorization key for this workspace.
+ PrimaryToken *string `json:"primaryToken,omitempty"`
+ // SecondaryToken - Secondary authorization key for this workspace.
+ SecondaryToken *string `json:"secondaryToken,omitempty"`
+}
+
+// ListResult the result of a request to list machine learning workspace keys.
+type ListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to request the next list of machine learning workspaces.
+ Value *[]Workspace `json:"value,omitempty"`
+ // NextLink - The URI that can be used to request the next list of machine learning workspaces.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListResultIterator provides access to a complete listing of Workspace values.
+type ListResultIterator struct {
+ i int
+ page ListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ListResultIterator) Response() ListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ListResultIterator) Value() Workspace {
+ if !iter.page.NotDone() {
+ return Workspace{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ListResultIterator type.
+func NewListResultIterator(page ListResultPage) ListResultIterator {
+ return ListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lr ListResult) IsEmpty() bool {
+ return lr.Value == nil || len(*lr.Value) == 0
+}
+
+// listResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) {
+ if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lr.NextLink)))
+}
+
+// ListResultPage contains a page of Workspace values.
+type ListResultPage struct {
+ fn func(context.Context, ListResult) (ListResult, error)
+ lr ListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lr)
+ if err != nil {
+ return err
+ }
+ page.lr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListResultPage) NotDone() bool {
+ return !page.lr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListResultPage) Response() ListResult {
+ return page.lr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListResultPage) Values() []Workspace {
+ if page.lr.IsEmpty() {
+ return nil
+ }
+ return *page.lr.Value
+}
+
+// Creates a new instance of the ListResultPage type.
+func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return ListResultPage{fn: getNextPage}
+}
+
+// Operation azure Machine Learning Studio REST API operation
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{operation}
+ Name *string `json:"name,omitempty"`
+ // Display - Display name of operation
+ Display *OperationDisplay `json:"display,omitempty"`
+}
+
+// OperationDisplay display name of operation
+type OperationDisplay struct {
+ // Provider - The resource provider name: Microsoft.MachineLearning
+ Provider *string `json:"provider,omitempty"`
+ // Resource - The resource on which the operation is performed.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - The operation that users can perform.
+ Operation *string `json:"operation,omitempty"`
+ // Description - The description for the operation.
+ Description *string `json:"description,omitempty"`
+}
+
+// OperationListResult an array of operations supported by the resource provider.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of AML Studio operations supported by the AML Studio resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+}
+
+// Properties the properties of a machine learning workspace.
+type Properties struct {
+ // UserStorageAccountID - The fully qualified arm id of the storage account associated with this workspace.
+ UserStorageAccountID *string `json:"userStorageAccountId,omitempty"`
+ // OwnerEmail - The email id of the owner for this workspace.
+ OwnerEmail *string `json:"ownerEmail,omitempty"`
+ // WorkspaceType - READ-ONLY; The type of this workspace. Possible values include: 'Production', 'Free', 'Anonymous', 'PaidStandard', 'PaidPremium'
+ WorkspaceType WorkspaceType `json:"workspaceType,omitempty"`
+ // WorkspaceState - READ-ONLY; The current state of workspace resource. Possible values include: 'Deleted', 'Enabled', 'Disabled', 'Migrated', 'Updated', 'Registered', 'Unregistered'
+ WorkspaceState State `json:"workspaceState,omitempty"`
+ // WorkspaceID - READ-ONLY; The immutable id associated with this workspace.
+ WorkspaceID *string `json:"workspaceId,omitempty"`
+ // CreationTime - READ-ONLY; The creation time for this workspace resource.
+ CreationTime *string `json:"creationTime,omitempty"`
+ // StudioEndpoint - READ-ONLY; The regional endpoint for the machine learning studio service which hosts this workspace.
+ StudioEndpoint *string `json:"studioEndpoint,omitempty"`
+ // KeyVaultIdentifierID - The key vault identifier used for encrypted workspaces.
+ KeyVaultIdentifierID *string `json:"keyVaultIdentifierId,omitempty"`
+}
+
+// PropertiesUpdateParameters the parameters for updating the properties of a machine learning workspace.
+type PropertiesUpdateParameters struct {
+ // WorkspaceState - The current state of workspace resource. Possible values include: 'Deleted', 'Enabled', 'Disabled', 'Migrated', 'Updated', 'Registered', 'Unregistered'
+ WorkspaceState State `json:"workspaceState,omitempty"`
+ // KeyVaultIdentifierID - The key vault identifier used for encrypted workspaces.
+ KeyVaultIdentifierID *string `json:"keyVaultIdentifierId,omitempty"`
+ // Sku - The sku of the workspace.
+ Sku *Sku `json:"sku,omitempty"`
+}
+
+// Resource an Azure resource.
+type Resource struct {
+ // ID - READ-ONLY; The resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the resource.
+ Type *string `json:"type,omitempty"`
+ // Location - The location of the resource. This cannot be changed after the resource is created.
+ Location *string `json:"location,omitempty"`
+ // Tags - The tags of the resource.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The sku of the workspace.
+ Sku *Sku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ if r.Sku != nil {
+ objectMap["sku"] = r.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// Sku sku of the resource
+type Sku struct {
+ // Name - Name of the sku
+ Name *string `json:"name,omitempty"`
+ // Tier - Tier of the sku like Basic or Enterprise
+ Tier *string `json:"tier,omitempty"`
+}
+
+// UpdateParameters the parameters for updating a machine learning workspace.
+type UpdateParameters struct {
+ // Tags - The resource tags for the machine learning workspace.
+ Tags map[string]*string `json:"tags"`
+ // PropertiesUpdateParameters - The properties that the machine learning workspace will be updated with.
+ *PropertiesUpdateParameters `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for UpdateParameters.
+func (up UpdateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if up.Tags != nil {
+ objectMap["tags"] = up.Tags
+ }
+ if up.PropertiesUpdateParameters != nil {
+ objectMap["properties"] = up.PropertiesUpdateParameters
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for UpdateParameters struct.
+func (up *UpdateParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ up.Tags = tags
+ }
+ case "properties":
+ if v != nil {
+ var propertiesUpdateParameters PropertiesUpdateParameters
+ err = json.Unmarshal(*v, &propertiesUpdateParameters)
+ if err != nil {
+ return err
+ }
+ up.PropertiesUpdateParameters = &propertiesUpdateParameters
+ }
+ }
+ }
+
+ return nil
+}
+
+// Workspace an object that represents a machine learning workspace.
+type Workspace struct {
+ autorest.Response `json:"-"`
+ // Properties - The properties of the machine learning workspace.
+ *Properties `json:"properties,omitempty"`
+ // ID - READ-ONLY; The resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the resource.
+ Type *string `json:"type,omitempty"`
+ // Location - The location of the resource. This cannot be changed after the resource is created.
+ Location *string `json:"location,omitempty"`
+ // Tags - The tags of the resource.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The sku of the workspace.
+ Sku *Sku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Workspace.
+func (w Workspace) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if w.Properties != nil {
+ objectMap["properties"] = w.Properties
+ }
+ if w.Location != nil {
+ objectMap["location"] = w.Location
+ }
+ if w.Tags != nil {
+ objectMap["tags"] = w.Tags
+ }
+ if w.Sku != nil {
+ objectMap["sku"] = w.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Workspace struct.
+func (w *Workspace) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var properties Properties
+ err = json.Unmarshal(*v, &properties)
+ if err != nil {
+ return err
+ }
+ w.Properties = &properties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ w.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ w.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ w.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ w.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ w.Tags = tags
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ w.Sku = &sku
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/services/machinelearning/mgmt/2019-10-01/workspaces/operations.go b/services/machinelearning/mgmt/2019-10-01/workspaces/operations.go
new file mode 100644
index 000000000000..9eb5a17f1918
--- /dev/null
+++ b/services/machinelearning/mgmt/2019-10-01/workspaces/operations.go
@@ -0,0 +1,110 @@
+package workspaces
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// OperationsClient is the these APIs allow end users to operate on Azure Machine Learning Workspace resources. They
+// support CRUD operations for Azure Machine Learning Workspaces.
+type OperationsClient struct {
+ BaseClient
+}
+
+// NewOperationsClient creates an instance of the OperationsClient client.
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List lists all of the available Azure Machine Learning Studio REST API operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2019-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.MachineLearning/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/services/machinelearning/mgmt/2019-10-01/workspaces/version.go b/services/machinelearning/mgmt/2019-10-01/workspaces/version.go
new file mode 100644
index 000000000000..5d00e50e3249
--- /dev/null
+++ b/services/machinelearning/mgmt/2019-10-01/workspaces/version.go
@@ -0,0 +1,30 @@
+package workspaces
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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.
+
+// UserAgent returns the UserAgent string to use when sending http.Requests.
+func UserAgent() string {
+ return "Azure-SDK-For-Go/" + version.Number + " workspaces/2019-10-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/services/machinelearning/mgmt/2019-10-01/workspaces/workspaces.go b/services/machinelearning/mgmt/2019-10-01/workspaces/workspaces.go
new file mode 100644
index 000000000000..dedb2b397540
--- /dev/null
+++ b/services/machinelearning/mgmt/2019-10-01/workspaces/workspaces.go
@@ -0,0 +1,741 @@
+package workspaces
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// Client is the these APIs allow end users to operate on Azure Machine Learning Workspace resources. They support CRUD
+// operations for Azure Machine Learning Workspaces.
+type Client struct {
+ BaseClient
+}
+
+// NewClient creates an instance of the Client client.
+func NewClient(subscriptionID string) Client {
+ return NewClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewClientWithBaseURI creates an instance of the Client client.
+func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
+ return Client{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a workspace with the specified parameters.
+// Parameters:
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+// workspaceName - the name of the machine learning workspace.
+// parameters - the parameters for creating or updating a machine learning workspace.
+func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result Workspace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.UserStorageAccountID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Properties.OwnerEmail", Name: validation.Null, Rule: true, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("workspaces.Client", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/workspaces/{workspaceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client Client) CreateOrUpdateResponder(resp *http.Response) (result Workspace, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes a machine learning workspace.
+// Parameters:
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+// workspaceName - the name of the machine learning workspace.
+func (client Client) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client Client) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/workspaces/{workspaceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) DeleteSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets the properties of the specified machine learning workspace.
+// Parameters:
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+// workspaceName - the name of the machine learning workspace.
+func (client Client) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result Workspace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/workspaces/{workspaceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) GetSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client Client) GetResponder(resp *http.Response) (result Workspace, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists all the available machine learning workspaces under the specified subscription.
+func (client Client) List(ctx context.Context) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.List")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client Client) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearning/workspaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client Client) ListResponder(resp *http.Response) (result ListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client Client) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "workspaces.Client", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "workspaces.Client", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListComplete(ctx context.Context) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup lists all the available machine learning workspaces under the specified resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/workspaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client Client) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client Client) listByResourceGroupNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "workspaces.Client", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "workspaces.Client", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListWorkspaceKeys list the authorization keys associated with this workspace.
+// Parameters:
+// workspaceName - the name of the machine learning workspace.
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+func (client Client) ListWorkspaceKeys(ctx context.Context, workspaceName string, resourceGroupName string) (result KeysResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListWorkspaceKeys")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListWorkspaceKeysPreparer(ctx, workspaceName, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListWorkspaceKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListWorkspaceKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListWorkspaceKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListWorkspaceKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListWorkspaceKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListWorkspaceKeysPreparer prepares the ListWorkspaceKeys request.
+func (client Client) ListWorkspaceKeysPreparer(ctx context.Context, workspaceName string, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/workspaces/{workspaceName}/listWorkspaceKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListWorkspaceKeysSender sends the ListWorkspaceKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListWorkspaceKeysSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListWorkspaceKeysResponder handles the response to the ListWorkspaceKeys request. The method always
+// closes the http.Response Body.
+func (client Client) ListWorkspaceKeysResponder(resp *http.Response) (result KeysResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ResyncStorageKeys resync storage keys associated with this workspace.
+// Parameters:
+// workspaceName - the name of the machine learning workspace.
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+func (client Client) ResyncStorageKeys(ctx context.Context, workspaceName string, resourceGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ResyncStorageKeys")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ResyncStorageKeysPreparer(ctx, workspaceName, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ResyncStorageKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ResyncStorageKeysSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ResyncStorageKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ResyncStorageKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ResyncStorageKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ResyncStorageKeysPreparer prepares the ResyncStorageKeys request.
+func (client Client) ResyncStorageKeysPreparer(ctx context.Context, workspaceName string, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/workspaces/{workspaceName}/resyncStorageKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResyncStorageKeysSender sends the ResyncStorageKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ResyncStorageKeysSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ResyncStorageKeysResponder handles the response to the ResyncStorageKeys request. The method always
+// closes the http.Response Body.
+func (client Client) ResyncStorageKeysResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update updates a machine learning workspace with the specified parameters.
+// Parameters:
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+// workspaceName - the name of the machine learning workspace.
+// parameters - the parameters for updating a machine learning workspace.
+func (client Client) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters UpdateParameters) (result Workspace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters UpdateParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/workspaces/{workspaceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) UpdateSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client Client) UpdateResponder(resp *http.Response) (result Workspace, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/services/machinelearning/mgmt/2019-10-01/workspaces/workspacesapi/interfaces.go b/services/machinelearning/mgmt/2019-10-01/workspaces/workspacesapi/interfaces.go
new file mode 100644
index 000000000000..3c0e58630f26
--- /dev/null
+++ b/services/machinelearning/mgmt/2019-10-01/workspaces/workspacesapi/interfaces.go
@@ -0,0 +1,45 @@
+package workspacesapi
+
+// 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/machinelearning/mgmt/2019-10-01/workspaces"
+ "github.com/Azure/go-autorest/autorest"
+)
+
+// OperationsClientAPI contains the set of methods on the OperationsClient type.
+type OperationsClientAPI interface {
+ List(ctx context.Context) (result workspaces.OperationListResult, err error)
+}
+
+var _ OperationsClientAPI = (*workspaces.OperationsClient)(nil)
+
+// ClientAPI contains the set of methods on the Client type.
+type ClientAPI interface {
+ CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters workspaces.Workspace) (result workspaces.Workspace, err error)
+ Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error)
+ Get(ctx context.Context, resourceGroupName string, workspaceName string) (result workspaces.Workspace, err error)
+ List(ctx context.Context) (result workspaces.ListResultPage, err error)
+ ListByResourceGroup(ctx context.Context, resourceGroupName string) (result workspaces.ListResultPage, err error)
+ ListWorkspaceKeys(ctx context.Context, workspaceName string, resourceGroupName string) (result workspaces.KeysResponse, err error)
+ ResyncStorageKeys(ctx context.Context, workspaceName string, resourceGroupName string) (result autorest.Response, err error)
+ Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters workspaces.UpdateParameters) (result workspaces.Workspace, err error)
+}
+
+var _ ClientAPI = (*workspaces.Client)(nil)
diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/client.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/client.go
new file mode 100644
index 000000000000..c45bf7ac1a4d
--- /dev/null
+++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/client.go
@@ -0,0 +1,165 @@
+// Package machinelearningservices implements the Azure ARM Machinelearningservices service API version 2019-11-01.
+//
+// These APIs allow end users to operate on Azure Machine Learning Workspace resources.
+package machinelearningservices
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Machinelearningservices
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Machinelearningservices.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
+
+// ListSkus lists all skus with associated features
+func (client BaseClient) ListSkus(ctx context.Context) (result SkuListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListSkus")
+ defer func() {
+ sc := -1
+ if result.slr.Response.Response != nil {
+ sc = result.slr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listSkusNextResults
+ req, err := client.ListSkusPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.BaseClient", "ListSkus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSkusSender(req)
+ if err != nil {
+ result.slr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.BaseClient", "ListSkus", resp, "Failure sending request")
+ return
+ }
+
+ result.slr, err = client.ListSkusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.BaseClient", "ListSkus", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListSkusPreparer prepares the ListSkus request.
+func (client BaseClient) ListSkusPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSkusSender sends the ListSkus request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) ListSkusSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListSkusResponder handles the response to the ListSkus request. The method always
+// closes the http.Response Body.
+func (client BaseClient) ListSkusResponder(resp *http.Response) (result SkuListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listSkusNextResults retrieves the next set of results, if any.
+func (client BaseClient) listSkusNextResults(ctx context.Context, lastResults SkuListResult) (result SkuListResult, err error) {
+ req, err := lastResults.skuListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.BaseClient", "listSkusNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSkusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.BaseClient", "listSkusNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListSkusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.BaseClient", "listSkusNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListSkusComplete enumerates all values, automatically crossing page boundaries as required.
+func (client BaseClient) ListSkusComplete(ctx context.Context) (result SkuListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListSkus")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListSkus(ctx)
+ return
+}
diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningcompute.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningcompute.go
new file mode 100644
index 000000000000..a1f4adeb26e2
--- /dev/null
+++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningcompute.go
@@ -0,0 +1,646 @@
+package machinelearningservices
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// MachineLearningComputeClient is the these APIs allow end users to operate on Azure Machine Learning Workspace
+// resources.
+type MachineLearningComputeClient struct {
+ BaseClient
+}
+
+// NewMachineLearningComputeClient creates an instance of the MachineLearningComputeClient client.
+func NewMachineLearningComputeClient(subscriptionID string) MachineLearningComputeClient {
+ return NewMachineLearningComputeClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client.
+func NewMachineLearningComputeClientWithBaseURI(baseURI string, subscriptionID string) MachineLearningComputeClient {
+ return MachineLearningComputeClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable
+// operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// computeName - name of the Azure Machine Learning compute.
+// parameters - payload with Machine Learning compute definition.
+func (client MachineLearningComputeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ComputeResource) (result MachineLearningComputeCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, computeName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client MachineLearningComputeClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ComputeResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "computeName": autorest.Encode("path", computeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) CreateOrUpdateSender(req *http.Request) (future MachineLearningComputeCreateOrUpdateFuture, err error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req, sd...)
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) CreateOrUpdateResponder(resp *http.Response) (result ComputeResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes specified Machine Learning compute.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// computeName - name of the Azure Machine Learning compute.
+// underlyingResourceAction - delete the underlying compute if 'Delete', or detach the underlying compute from
+// workspace if 'Detach'.
+func (client MachineLearningComputeClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction UnderlyingResourceAction) (result MachineLearningComputeDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, computeName, underlyingResourceAction)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client MachineLearningComputeClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction UnderlyingResourceAction) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "computeName": autorest.Encode("path", computeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "underlyingResourceAction": autorest.Encode("query", underlyingResourceAction),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) DeleteSender(req *http.Request) (future MachineLearningComputeDeleteFuture, err error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req, sd...)
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) DeleteResponder(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
+}
+
+// Get gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use
+// 'keys' nested resource to get them.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// computeName - name of the Azure Machine Learning compute.
+func (client MachineLearningComputeClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result ComputeResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, computeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client MachineLearningComputeClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "computeName": autorest.Encode("path", computeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) GetSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) GetResponder(resp *http.Response) (result ComputeResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByWorkspace gets computes in specified workspace.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// skiptoken - continuation token for pagination.
+func (client MachineLearningComputeClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result PaginatedComputeResourcesListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.ListByWorkspace")
+ defer func() {
+ sc := -1
+ if result.pcrl.Response.Response != nil {
+ sc = result.pcrl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByWorkspaceNextResults
+ req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListByWorkspace", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByWorkspaceSender(req)
+ if err != nil {
+ result.pcrl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListByWorkspace", resp, "Failure sending request")
+ return
+ }
+
+ result.pcrl, err = client.ListByWorkspaceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListByWorkspace", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByWorkspacePreparer prepares the ListByWorkspace request.
+func (client MachineLearningComputeClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) ListByWorkspaceResponder(resp *http.Response) (result PaginatedComputeResourcesList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByWorkspaceNextResults retrieves the next set of results, if any.
+func (client MachineLearningComputeClient) listByWorkspaceNextResults(ctx context.Context, lastResults PaginatedComputeResourcesList) (result PaginatedComputeResourcesList, err error) {
+ req, err := lastResults.paginatedComputeResourcesListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByWorkspaceSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "listByWorkspaceNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByWorkspaceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required.
+func (client MachineLearningComputeClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result PaginatedComputeResourcesListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.ListByWorkspace")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByWorkspace(ctx, resourceGroupName, workspaceName, skiptoken)
+ return
+}
+
+// ListKeys gets secrets related to Machine Learning compute (storage keys, service credentials, etc).
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// computeName - name of the Azure Machine Learning compute.
+func (client MachineLearningComputeClient) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result ComputeSecretsModel, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.ListKeys")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListKeysPreparer(ctx, resourceGroupName, workspaceName, computeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListKeysPreparer prepares the ListKeys request.
+func (client MachineLearningComputeClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "computeName": autorest.Encode("path", computeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListKeysSender sends the ListKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) ListKeysSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListKeysResponder handles the response to the ListKeys request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) ListKeysResponder(resp *http.Response) (result ComputeSecretsModel, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListNodes get the details (e.g IP address, port etc) of all the compute nodes in the compute.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// computeName - name of the Azure Machine Learning compute.
+func (client MachineLearningComputeClient) ListNodes(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result AmlComputeNodesInformation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.ListNodes")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListNodesPreparer(ctx, resourceGroupName, workspaceName, computeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListNodes", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListNodesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListNodes", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListNodesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListNodes", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListNodesPreparer prepares the ListNodes request.
+func (client MachineLearningComputeClient) ListNodesPreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "computeName": autorest.Encode("path", computeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListNodesSender sends the ListNodes request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) ListNodesSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListNodesResponder handles the response to the ListNodes request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) ListNodesResponder(resp *http.Response) (result AmlComputeNodesInformation, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Update updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable
+// operation.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// computeName - name of the Azure Machine Learning compute.
+// parameters - additional parameters for cluster update.
+func (client MachineLearningComputeClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ClusterUpdateParameters) (result MachineLearningComputeUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, computeName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client MachineLearningComputeClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ClusterUpdateParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "computeName": autorest.Encode("path", computeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) UpdateSender(req *http.Request) (future MachineLearningComputeUpdateFuture, err error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req, sd...)
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) UpdateResponder(resp *http.Response) (result ComputeResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningservicesapi/interfaces.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningservicesapi/interfaces.go
new file mode 100644
index 000000000000..7b616501cac5
--- /dev/null
+++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningservicesapi/interfaces.go
@@ -0,0 +1,94 @@
+package machinelearningservicesapi
+
+// 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/machinelearningservices/mgmt/2019-11-01/machinelearningservices"
+ "github.com/Azure/go-autorest/autorest"
+)
+
+// BaseClientAPI contains the set of methods on the BaseClient type.
+type BaseClientAPI interface {
+ ListSkus(ctx context.Context) (result machinelearningservices.SkuListResultPage, err error)
+}
+
+var _ BaseClientAPI = (*machinelearningservices.BaseClient)(nil)
+
+// OperationsClientAPI contains the set of methods on the OperationsClient type.
+type OperationsClientAPI interface {
+ List(ctx context.Context) (result machinelearningservices.OperationListResult, err error)
+}
+
+var _ OperationsClientAPI = (*machinelearningservices.OperationsClient)(nil)
+
+// WorkspacesClientAPI contains the set of methods on the WorkspacesClient type.
+type WorkspacesClientAPI interface {
+ CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.Workspace) (result machinelearningservices.Workspace, err error)
+ Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error)
+ Get(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.Workspace, err error)
+ ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error)
+ ListBySubscription(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error)
+ ListKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListWorkspaceKeysResult, err error)
+ ResyncKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error)
+ Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.WorkspaceUpdateParameters) (result machinelearningservices.Workspace, err error)
+}
+
+var _ WorkspacesClientAPI = (*machinelearningservices.WorkspacesClient)(nil)
+
+// WorkspaceFeaturesClientAPI contains the set of methods on the WorkspaceFeaturesClient type.
+type WorkspaceFeaturesClientAPI interface {
+ List(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListAmlUserFeatureResultPage, err error)
+}
+
+var _ WorkspaceFeaturesClientAPI = (*machinelearningservices.WorkspaceFeaturesClient)(nil)
+
+// UsagesClientAPI contains the set of methods on the UsagesClient type.
+type UsagesClientAPI interface {
+ List(ctx context.Context, location string) (result machinelearningservices.ListUsagesResultPage, err error)
+}
+
+var _ UsagesClientAPI = (*machinelearningservices.UsagesClient)(nil)
+
+// VirtualMachineSizesClientAPI contains the set of methods on the VirtualMachineSizesClient type.
+type VirtualMachineSizesClientAPI interface {
+ List(ctx context.Context, location string) (result machinelearningservices.VirtualMachineSizeListResult, err error)
+}
+
+var _ VirtualMachineSizesClientAPI = (*machinelearningservices.VirtualMachineSizesClient)(nil)
+
+// QuotasClientAPI contains the set of methods on the QuotasClient type.
+type QuotasClientAPI interface {
+ List(ctx context.Context, location string) (result machinelearningservices.ListWorkspaceQuotasPage, err error)
+ Update(ctx context.Context, location string, parameters machinelearningservices.QuotaUpdateParameters) (result machinelearningservices.UpdateWorkspaceQuotasResult, err error)
+}
+
+var _ QuotasClientAPI = (*machinelearningservices.QuotasClient)(nil)
+
+// MachineLearningComputeClientAPI contains the set of methods on the MachineLearningComputeClient type.
+type MachineLearningComputeClientAPI interface {
+ CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters machinelearningservices.ComputeResource) (result machinelearningservices.MachineLearningComputeCreateOrUpdateFuture, err error)
+ Delete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction machinelearningservices.UnderlyingResourceAction) (result machinelearningservices.MachineLearningComputeDeleteFuture, err error)
+ Get(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeResource, err error)
+ ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListPage, err error)
+ ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeSecretsModel, err error)
+ ListNodes(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.AmlComputeNodesInformation, err error)
+ Update(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters machinelearningservices.ClusterUpdateParameters) (result machinelearningservices.MachineLearningComputeUpdateFuture, err error)
+}
+
+var _ MachineLearningComputeClientAPI = (*machinelearningservices.MachineLearningComputeClient)(nil)
diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/models.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/models.go
new file mode 100644
index 000000000000..3b75b2b1d4b6
--- /dev/null
+++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/models.go
@@ -0,0 +1,3341 @@
+package machinelearningservices
+
+// 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"
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices"
+
+// AllocationState enumerates the values for allocation state.
+type AllocationState string
+
+const (
+ // Resizing ...
+ Resizing AllocationState = "Resizing"
+ // Steady ...
+ Steady AllocationState = "Steady"
+)
+
+// PossibleAllocationStateValues returns an array of possible values for the AllocationState const type.
+func PossibleAllocationStateValues() []AllocationState {
+ return []AllocationState{Resizing, Steady}
+}
+
+// ComputeType enumerates the values for compute type.
+type ComputeType string
+
+const (
+ // ComputeTypeAKS ...
+ ComputeTypeAKS ComputeType = "AKS"
+ // ComputeTypeAmlCompute ...
+ ComputeTypeAmlCompute ComputeType = "AmlCompute"
+ // ComputeTypeDatabricks ...
+ ComputeTypeDatabricks ComputeType = "Databricks"
+ // ComputeTypeDataFactory ...
+ ComputeTypeDataFactory ComputeType = "DataFactory"
+ // ComputeTypeDataLakeAnalytics ...
+ ComputeTypeDataLakeAnalytics ComputeType = "DataLakeAnalytics"
+ // ComputeTypeHDInsight ...
+ ComputeTypeHDInsight ComputeType = "HDInsight"
+ // ComputeTypeVirtualMachine ...
+ ComputeTypeVirtualMachine ComputeType = "VirtualMachine"
+)
+
+// PossibleComputeTypeValues returns an array of possible values for the ComputeType const type.
+func PossibleComputeTypeValues() []ComputeType {
+ return []ComputeType{ComputeTypeAKS, ComputeTypeAmlCompute, ComputeTypeDatabricks, ComputeTypeDataFactory, ComputeTypeDataLakeAnalytics, ComputeTypeHDInsight, ComputeTypeVirtualMachine}
+}
+
+// ComputeTypeBasicCompute enumerates the values for compute type basic compute.
+type ComputeTypeBasicCompute string
+
+const (
+ // ComputeTypeAKS1 ...
+ ComputeTypeAKS1 ComputeTypeBasicCompute = "AKS"
+ // ComputeTypeAmlCompute1 ...
+ ComputeTypeAmlCompute1 ComputeTypeBasicCompute = "AmlCompute"
+ // ComputeTypeCompute ...
+ ComputeTypeCompute ComputeTypeBasicCompute = "Compute"
+ // ComputeTypeDatabricks1 ...
+ ComputeTypeDatabricks1 ComputeTypeBasicCompute = "Databricks"
+ // ComputeTypeDataFactory1 ...
+ ComputeTypeDataFactory1 ComputeTypeBasicCompute = "DataFactory"
+ // ComputeTypeDataLakeAnalytics1 ...
+ ComputeTypeDataLakeAnalytics1 ComputeTypeBasicCompute = "DataLakeAnalytics"
+ // ComputeTypeHDInsight1 ...
+ ComputeTypeHDInsight1 ComputeTypeBasicCompute = "HDInsight"
+ // ComputeTypeVirtualMachine1 ...
+ ComputeTypeVirtualMachine1 ComputeTypeBasicCompute = "VirtualMachine"
+)
+
+// PossibleComputeTypeBasicComputeValues returns an array of possible values for the ComputeTypeBasicCompute const type.
+func PossibleComputeTypeBasicComputeValues() []ComputeTypeBasicCompute {
+ return []ComputeTypeBasicCompute{ComputeTypeAKS1, ComputeTypeAmlCompute1, ComputeTypeCompute, ComputeTypeDatabricks1, ComputeTypeDataFactory1, ComputeTypeDataLakeAnalytics1, ComputeTypeHDInsight1, ComputeTypeVirtualMachine1}
+}
+
+// ComputeTypeBasicComputeNodesInformation enumerates the values for compute type basic compute nodes
+// information.
+type ComputeTypeBasicComputeNodesInformation string
+
+const (
+ // ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute ...
+ ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute ComputeTypeBasicComputeNodesInformation = "AmlCompute"
+ // ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation ...
+ ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation ComputeTypeBasicComputeNodesInformation = "ComputeNodesInformation"
+)
+
+// PossibleComputeTypeBasicComputeNodesInformationValues returns an array of possible values for the ComputeTypeBasicComputeNodesInformation const type.
+func PossibleComputeTypeBasicComputeNodesInformationValues() []ComputeTypeBasicComputeNodesInformation {
+ return []ComputeTypeBasicComputeNodesInformation{ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute, ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation}
+}
+
+// ComputeTypeBasicComputeSecrets enumerates the values for compute type basic compute secrets.
+type ComputeTypeBasicComputeSecrets string
+
+const (
+ // ComputeTypeBasicComputeSecretsComputeTypeAKS ...
+ ComputeTypeBasicComputeSecretsComputeTypeAKS ComputeTypeBasicComputeSecrets = "AKS"
+ // ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets ...
+ ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets ComputeTypeBasicComputeSecrets = "ComputeSecrets"
+ // ComputeTypeBasicComputeSecretsComputeTypeDatabricks ...
+ ComputeTypeBasicComputeSecretsComputeTypeDatabricks ComputeTypeBasicComputeSecrets = "Databricks"
+ // ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine ...
+ ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine ComputeTypeBasicComputeSecrets = "VirtualMachine"
+)
+
+// PossibleComputeTypeBasicComputeSecretsValues returns an array of possible values for the ComputeTypeBasicComputeSecrets const type.
+func PossibleComputeTypeBasicComputeSecretsValues() []ComputeTypeBasicComputeSecrets {
+ return []ComputeTypeBasicComputeSecrets{ComputeTypeBasicComputeSecretsComputeTypeAKS, ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets, ComputeTypeBasicComputeSecretsComputeTypeDatabricks, ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine}
+}
+
+// NodeState enumerates the values for node state.
+type NodeState string
+
+const (
+ // Idle ...
+ Idle NodeState = "idle"
+ // Leaving ...
+ Leaving NodeState = "leaving"
+ // Preempted ...
+ Preempted NodeState = "preempted"
+ // Preparing ...
+ Preparing NodeState = "preparing"
+ // Running ...
+ Running NodeState = "running"
+ // Unusable ...
+ Unusable NodeState = "unusable"
+)
+
+// PossibleNodeStateValues returns an array of possible values for the NodeState const type.
+func PossibleNodeStateValues() []NodeState {
+ return []NodeState{Idle, Leaving, Preempted, Preparing, Running, Unusable}
+}
+
+// ProvisioningState enumerates the values for provisioning state.
+type ProvisioningState string
+
+const (
+ // Canceled ...
+ Canceled ProvisioningState = "Canceled"
+ // Creating ...
+ Creating ProvisioningState = "Creating"
+ // Deleting ...
+ Deleting ProvisioningState = "Deleting"
+ // Failed ...
+ Failed ProvisioningState = "Failed"
+ // Succeeded ...
+ Succeeded ProvisioningState = "Succeeded"
+ // Unknown ...
+ Unknown ProvisioningState = "Unknown"
+ // Updating ...
+ Updating ProvisioningState = "Updating"
+)
+
+// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return []ProvisioningState{Canceled, Creating, Deleting, Failed, Succeeded, Unknown, Updating}
+}
+
+// QuotaUnit enumerates the values for quota unit.
+type QuotaUnit string
+
+const (
+ // Count ...
+ Count QuotaUnit = "Count"
+)
+
+// PossibleQuotaUnitValues returns an array of possible values for the QuotaUnit const type.
+func PossibleQuotaUnitValues() []QuotaUnit {
+ return []QuotaUnit{Count}
+}
+
+// ReasonCode enumerates the values for reason code.
+type ReasonCode string
+
+const (
+ // NotAvailableForRegion ...
+ NotAvailableForRegion ReasonCode = "NotAvailableForRegion"
+ // NotAvailableForSubscription ...
+ NotAvailableForSubscription ReasonCode = "NotAvailableForSubscription"
+ // NotSpecified ...
+ NotSpecified ReasonCode = "NotSpecified"
+)
+
+// PossibleReasonCodeValues returns an array of possible values for the ReasonCode const type.
+func PossibleReasonCodeValues() []ReasonCode {
+ return []ReasonCode{NotAvailableForRegion, NotAvailableForSubscription, NotSpecified}
+}
+
+// RemoteLoginPortPublicAccess enumerates the values for remote login port public access.
+type RemoteLoginPortPublicAccess string
+
+const (
+ // RemoteLoginPortPublicAccessDisabled ...
+ RemoteLoginPortPublicAccessDisabled RemoteLoginPortPublicAccess = "Disabled"
+ // RemoteLoginPortPublicAccessEnabled ...
+ RemoteLoginPortPublicAccessEnabled RemoteLoginPortPublicAccess = "Enabled"
+ // RemoteLoginPortPublicAccessNotSpecified ...
+ RemoteLoginPortPublicAccessNotSpecified RemoteLoginPortPublicAccess = "NotSpecified"
+)
+
+// PossibleRemoteLoginPortPublicAccessValues returns an array of possible values for the RemoteLoginPortPublicAccess const type.
+func PossibleRemoteLoginPortPublicAccessValues() []RemoteLoginPortPublicAccess {
+ return []RemoteLoginPortPublicAccess{RemoteLoginPortPublicAccessDisabled, RemoteLoginPortPublicAccessEnabled, RemoteLoginPortPublicAccessNotSpecified}
+}
+
+// ResourceIdentityType enumerates the values for resource identity type.
+type ResourceIdentityType string
+
+const (
+ // SystemAssigned ...
+ SystemAssigned ResourceIdentityType = "SystemAssigned"
+)
+
+// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return []ResourceIdentityType{SystemAssigned}
+}
+
+// Status enumerates the values for status.
+type Status string
+
+const (
+ // Failure ...
+ Failure Status = "Failure"
+ // InvalidQuotaBelowClusterMinimum ...
+ InvalidQuotaBelowClusterMinimum Status = "InvalidQuotaBelowClusterMinimum"
+ // InvalidQuotaExceedsSubscriptionLimit ...
+ InvalidQuotaExceedsSubscriptionLimit Status = "InvalidQuotaExceedsSubscriptionLimit"
+ // InvalidVMFamilyName ...
+ InvalidVMFamilyName Status = "InvalidVMFamilyName"
+ // OperationNotEnabledForRegion ...
+ OperationNotEnabledForRegion Status = "OperationNotEnabledForRegion"
+ // OperationNotSupportedForSku ...
+ OperationNotSupportedForSku Status = "OperationNotSupportedForSku"
+ // Success ...
+ Success Status = "Success"
+ // Undefined ...
+ Undefined Status = "Undefined"
+)
+
+// PossibleStatusValues returns an array of possible values for the Status const type.
+func PossibleStatusValues() []Status {
+ return []Status{Failure, InvalidQuotaBelowClusterMinimum, InvalidQuotaExceedsSubscriptionLimit, InvalidVMFamilyName, OperationNotEnabledForRegion, OperationNotSupportedForSku, Success, Undefined}
+}
+
+// Status1 enumerates the values for status 1.
+type Status1 string
+
+const (
+ // Disabled ...
+ Disabled Status1 = "Disabled"
+ // Enabled ...
+ Enabled Status1 = "Enabled"
+)
+
+// PossibleStatus1Values returns an array of possible values for the Status1 const type.
+func PossibleStatus1Values() []Status1 {
+ return []Status1{Disabled, Enabled}
+}
+
+// UnderlyingResourceAction enumerates the values for underlying resource action.
+type UnderlyingResourceAction string
+
+const (
+ // Delete ...
+ Delete UnderlyingResourceAction = "Delete"
+ // Detach ...
+ Detach UnderlyingResourceAction = "Detach"
+)
+
+// PossibleUnderlyingResourceActionValues returns an array of possible values for the UnderlyingResourceAction const type.
+func PossibleUnderlyingResourceActionValues() []UnderlyingResourceAction {
+ return []UnderlyingResourceAction{Delete, Detach}
+}
+
+// UsageUnit enumerates the values for usage unit.
+type UsageUnit string
+
+const (
+ // UsageUnitCount ...
+ UsageUnitCount UsageUnit = "Count"
+)
+
+// PossibleUsageUnitValues returns an array of possible values for the UsageUnit const type.
+func PossibleUsageUnitValues() []UsageUnit {
+ return []UsageUnit{UsageUnitCount}
+}
+
+// VMPriority enumerates the values for vm priority.
+type VMPriority string
+
+const (
+ // Dedicated ...
+ Dedicated VMPriority = "Dedicated"
+ // LowPriority ...
+ LowPriority VMPriority = "LowPriority"
+)
+
+// PossibleVMPriorityValues returns an array of possible values for the VMPriority const type.
+func PossibleVMPriorityValues() []VMPriority {
+ return []VMPriority{Dedicated, LowPriority}
+}
+
+// AKS a Machine Learning compute based on AKS.
+type AKS struct {
+ // Properties - AKS properties
+ Properties *AKSProperties `json:"properties,omitempty"`
+ // ComputeLocation - Location for the underlying compute
+ ComputeLocation *string `json:"computeLocation,omitempty"`
+ // ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - READ-ONLY; The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the underlying compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - READ-ONLY; Errors during provisioning
+ ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
+ // IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
+ IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AKS.
+func (a AKS) MarshalJSON() ([]byte, error) {
+ a.ComputeType = ComputeTypeAKS1
+ objectMap := make(map[string]interface{})
+ if a.Properties != nil {
+ objectMap["properties"] = a.Properties
+ }
+ if a.ComputeLocation != nil {
+ objectMap["computeLocation"] = a.ComputeLocation
+ }
+ if a.Description != nil {
+ objectMap["description"] = a.Description
+ }
+ if a.ResourceID != nil {
+ objectMap["resourceId"] = a.ResourceID
+ }
+ if a.ComputeType != "" {
+ objectMap["computeType"] = a.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for AKS.
+func (a AKS) AsAKS() (*AKS, bool) {
+ return &a, true
+}
+
+// AsAmlCompute is the BasicCompute implementation for AKS.
+func (a AKS) AsAmlCompute() (*AmlCompute, bool) {
+ return nil, false
+}
+
+// AsVirtualMachine is the BasicCompute implementation for AKS.
+func (a AKS) AsVirtualMachine() (*VirtualMachine, bool) {
+ return nil, false
+}
+
+// AsHDInsight is the BasicCompute implementation for AKS.
+func (a AKS) AsHDInsight() (*HDInsight, bool) {
+ return nil, false
+}
+
+// AsDataFactory is the BasicCompute implementation for AKS.
+func (a AKS) AsDataFactory() (*DataFactory, bool) {
+ return nil, false
+}
+
+// AsDatabricks is the BasicCompute implementation for AKS.
+func (a AKS) AsDatabricks() (*Databricks, bool) {
+ return nil, false
+}
+
+// AsDataLakeAnalytics is the BasicCompute implementation for AKS.
+func (a AKS) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
+ return nil, false
+}
+
+// AsCompute is the BasicCompute implementation for AKS.
+func (a AKS) AsCompute() (*Compute, bool) {
+ return nil, false
+}
+
+// AsBasicCompute is the BasicCompute implementation for AKS.
+func (a AKS) AsBasicCompute() (BasicCompute, bool) {
+ return &a, true
+}
+
+// AksComputeSecrets secrets related to a Machine Learning compute based on AKS.
+type AksComputeSecrets struct {
+ // UserKubeConfig - Content of kubeconfig file that can be used to connect to the Kubernetes cluster.
+ UserKubeConfig *string `json:"userKubeConfig,omitempty"`
+ // AdminKubeConfig - Content of kubeconfig file that can be used to connect to the Kubernetes cluster.
+ AdminKubeConfig *string `json:"adminKubeConfig,omitempty"`
+ // ImagePullSecretName - Image registry pull secret.
+ ImagePullSecretName *string `json:"imagePullSecretName,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
+ ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AksComputeSecrets.
+func (acs AksComputeSecrets) MarshalJSON() ([]byte, error) {
+ acs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeAKS
+ objectMap := make(map[string]interface{})
+ if acs.UserKubeConfig != nil {
+ objectMap["userKubeConfig"] = acs.UserKubeConfig
+ }
+ if acs.AdminKubeConfig != nil {
+ objectMap["adminKubeConfig"] = acs.AdminKubeConfig
+ }
+ if acs.ImagePullSecretName != nil {
+ objectMap["imagePullSecretName"] = acs.ImagePullSecretName
+ }
+ if acs.ComputeType != "" {
+ objectMap["computeType"] = acs.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAksComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
+func (acs AksComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
+ return &acs, true
+}
+
+// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
+func (acs AksComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
+ return nil, false
+}
+
+// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
+func (acs AksComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
+func (acs AksComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsBasicComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
+func (acs AksComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
+ return &acs, true
+}
+
+// AksNetworkingConfiguration advance configuration for AKS networking
+type AksNetworkingConfiguration struct {
+ // SubnetID - Virtual network subnet resource ID the compute nodes belong to
+ SubnetID *string `json:"subnetId,omitempty"`
+ // ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.
+ ServiceCidr *string `json:"serviceCidr,omitempty"`
+ // DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.
+ DNSServiceIP *string `json:"dnsServiceIP,omitempty"`
+ // DockerBridgeCidr - A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range.
+ DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"`
+}
+
+// AKSProperties AKS properties
+type AKSProperties struct {
+ // ClusterFqdn - Cluster full qualified domain name
+ ClusterFqdn *string `json:"clusterFqdn,omitempty"`
+ // SystemServices - READ-ONLY; System services
+ SystemServices *[]SystemService `json:"systemServices,omitempty"`
+ // AgentCount - Number of agents
+ AgentCount *int32 `json:"agentCount,omitempty"`
+ // AgentVMSize - Agent virtual machine size
+ AgentVMSize *string `json:"agentVMSize,omitempty"`
+ // SslConfiguration - SSL configuration
+ SslConfiguration *SslConfiguration `json:"sslConfiguration,omitempty"`
+ // AksNetworkingConfiguration - AKS networking configuration for vnet
+ AksNetworkingConfiguration *AksNetworkingConfiguration `json:"aksNetworkingConfiguration,omitempty"`
+}
+
+// AmlCompute an Azure Machine Learning compute.
+type AmlCompute struct {
+ // Properties - AML Compute properties
+ Properties *AmlComputeProperties `json:"properties,omitempty"`
+ // ComputeLocation - Location for the underlying compute
+ ComputeLocation *string `json:"computeLocation,omitempty"`
+ // ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - READ-ONLY; The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the underlying compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - READ-ONLY; Errors during provisioning
+ ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
+ // IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
+ IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AmlCompute.
+func (ac AmlCompute) MarshalJSON() ([]byte, error) {
+ ac.ComputeType = ComputeTypeAmlCompute1
+ objectMap := make(map[string]interface{})
+ if ac.Properties != nil {
+ objectMap["properties"] = ac.Properties
+ }
+ if ac.ComputeLocation != nil {
+ objectMap["computeLocation"] = ac.ComputeLocation
+ }
+ if ac.Description != nil {
+ objectMap["description"] = ac.Description
+ }
+ if ac.ResourceID != nil {
+ objectMap["resourceId"] = ac.ResourceID
+ }
+ if ac.ComputeType != "" {
+ objectMap["computeType"] = ac.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for AmlCompute.
+func (ac AmlCompute) AsAKS() (*AKS, bool) {
+ return nil, false
+}
+
+// AsAmlCompute is the BasicCompute implementation for AmlCompute.
+func (ac AmlCompute) AsAmlCompute() (*AmlCompute, bool) {
+ return &ac, true
+}
+
+// AsVirtualMachine is the BasicCompute implementation for AmlCompute.
+func (ac AmlCompute) AsVirtualMachine() (*VirtualMachine, bool) {
+ return nil, false
+}
+
+// AsHDInsight is the BasicCompute implementation for AmlCompute.
+func (ac AmlCompute) AsHDInsight() (*HDInsight, bool) {
+ return nil, false
+}
+
+// AsDataFactory is the BasicCompute implementation for AmlCompute.
+func (ac AmlCompute) AsDataFactory() (*DataFactory, bool) {
+ return nil, false
+}
+
+// AsDatabricks is the BasicCompute implementation for AmlCompute.
+func (ac AmlCompute) AsDatabricks() (*Databricks, bool) {
+ return nil, false
+}
+
+// AsDataLakeAnalytics is the BasicCompute implementation for AmlCompute.
+func (ac AmlCompute) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
+ return nil, false
+}
+
+// AsCompute is the BasicCompute implementation for AmlCompute.
+func (ac AmlCompute) AsCompute() (*Compute, bool) {
+ return nil, false
+}
+
+// AsBasicCompute is the BasicCompute implementation for AmlCompute.
+func (ac AmlCompute) AsBasicCompute() (BasicCompute, bool) {
+ return &ac, true
+}
+
+// AmlComputeNodeInformation compute node information related to a AmlCompute.
+type AmlComputeNodeInformation struct {
+ // NodeID - READ-ONLY; ID of the compute node.
+ NodeID *string `json:"nodeId,omitempty"`
+ // PrivateIPAddress - READ-ONLY; Private IP address of the compute node.
+ PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
+ // PublicIPAddress - READ-ONLY; Public IP address of the compute node.
+ PublicIPAddress *string `json:"publicIpAddress,omitempty"`
+ // Port - READ-ONLY; SSH port number of the node.
+ Port *float64 `json:"port,omitempty"`
+ // NodeState - READ-ONLY; State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. Possible values include: 'Idle', 'Running', 'Preparing', 'Unusable', 'Leaving', 'Preempted'
+ NodeState NodeState `json:"nodeState,omitempty"`
+ // RunID - READ-ONLY; ID of the Experiment running on the node, if any else null.
+ RunID *string `json:"runId,omitempty"`
+}
+
+// AmlComputeNodesInformation compute node information related to a AmlCompute.
+type AmlComputeNodesInformation struct {
+ autorest.Response `json:"-"`
+ // Nodes - READ-ONLY; The collection of returned AmlCompute nodes details.
+ Nodes *[]AmlComputeNodeInformation `json:"nodes,omitempty"`
+ // NextLink - READ-ONLY; The continuation token.
+ NextLink *string `json:"nextLink,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation', 'ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute'
+ ComputeType ComputeTypeBasicComputeNodesInformation `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AmlComputeNodesInformation.
+func (acni AmlComputeNodesInformation) MarshalJSON() ([]byte, error) {
+ acni.ComputeType = ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute
+ objectMap := make(map[string]interface{})
+ if acni.ComputeType != "" {
+ objectMap["computeType"] = acni.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAmlComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
+func (acni AmlComputeNodesInformation) AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool) {
+ return &acni, true
+}
+
+// AsComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
+func (acni AmlComputeNodesInformation) AsComputeNodesInformation() (*ComputeNodesInformation, bool) {
+ return nil, false
+}
+
+// AsBasicComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
+func (acni AmlComputeNodesInformation) AsBasicComputeNodesInformation() (BasicComputeNodesInformation, bool) {
+ return &acni, true
+}
+
+// AmlComputeProperties AML Compute properties
+type AmlComputeProperties struct {
+ // VMSize - Virtual Machine Size
+ VMSize *string `json:"vmSize,omitempty"`
+ // VMPriority - Virtual Machine priority. Possible values include: 'Dedicated', 'LowPriority'
+ VMPriority VMPriority `json:"vmPriority,omitempty"`
+ // ScaleSettings - Scale settings for AML Compute
+ ScaleSettings *ScaleSettings `json:"scaleSettings,omitempty"`
+ // UserAccountCredentials - Credentials for an administrator user account that will be created on each compute node.
+ UserAccountCredentials *UserAccountCredentials `json:"userAccountCredentials,omitempty"`
+ // Subnet - Virtual network subnet resource ID the compute nodes belong to.
+ Subnet *ResourceID `json:"subnet,omitempty"`
+ // RemoteLoginPortPublicAccess - State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. Possible values include: 'RemoteLoginPortPublicAccessEnabled', 'RemoteLoginPortPublicAccessDisabled', 'RemoteLoginPortPublicAccessNotSpecified'
+ RemoteLoginPortPublicAccess RemoteLoginPortPublicAccess `json:"remoteLoginPortPublicAccess,omitempty"`
+ // AllocationState - READ-ONLY; Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. Possible values include: 'Steady', 'Resizing'
+ AllocationState AllocationState `json:"allocationState,omitempty"`
+ // AllocationStateTransitionTime - READ-ONLY; The time at which the compute entered its current allocation state.
+ AllocationStateTransitionTime *date.Time `json:"allocationStateTransitionTime,omitempty"`
+ // Errors - READ-ONLY; Collection of errors encountered by various compute nodes during node setup.
+ Errors *[]Error `json:"errors,omitempty"`
+ // CurrentNodeCount - READ-ONLY; The number of compute nodes currently assigned to the compute.
+ CurrentNodeCount *int32 `json:"currentNodeCount,omitempty"`
+ // TargetNodeCount - READ-ONLY; The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation.
+ TargetNodeCount *int32 `json:"targetNodeCount,omitempty"`
+ // NodeStateCounts - READ-ONLY; Counts of various node states on the compute.
+ NodeStateCounts *NodeStateCounts `json:"nodeStateCounts,omitempty"`
+}
+
+// AmlUserFeature features enabled for a workspace
+type AmlUserFeature struct {
+ // ID - Specifies the feature ID
+ ID *string `json:"id,omitempty"`
+ // DisplayName - Specifies the feature name
+ DisplayName *string `json:"displayName,omitempty"`
+ // Description - Describes the feature for user experience
+ Description *string `json:"description,omitempty"`
+}
+
+// ClusterUpdateParameters amlCompute update parameters.
+type ClusterUpdateParameters struct {
+ // ClusterUpdateProperties - The properties of the amlCompute.
+ *ClusterUpdateProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ClusterUpdateParameters.
+func (cup ClusterUpdateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cup.ClusterUpdateProperties != nil {
+ objectMap["properties"] = cup.ClusterUpdateProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ClusterUpdateParameters struct.
+func (cup *ClusterUpdateParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var clusterUpdateProperties ClusterUpdateProperties
+ err = json.Unmarshal(*v, &clusterUpdateProperties)
+ if err != nil {
+ return err
+ }
+ cup.ClusterUpdateProperties = &clusterUpdateProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// ClusterUpdateProperties the properties of a amlCompute that need to be updated.
+type ClusterUpdateProperties struct {
+ // ScaleSettings - Desired scale settings for the amlCompute.
+ ScaleSettings *ScaleSettings `json:"scaleSettings,omitempty"`
+}
+
+// BasicCompute machine Learning compute object.
+type BasicCompute interface {
+ AsAKS() (*AKS, bool)
+ AsAmlCompute() (*AmlCompute, bool)
+ AsVirtualMachine() (*VirtualMachine, bool)
+ AsHDInsight() (*HDInsight, bool)
+ AsDataFactory() (*DataFactory, bool)
+ AsDatabricks() (*Databricks, bool)
+ AsDataLakeAnalytics() (*DataLakeAnalytics, bool)
+ AsCompute() (*Compute, bool)
+}
+
+// Compute machine Learning compute object.
+type Compute struct {
+ // ComputeLocation - Location for the underlying compute
+ ComputeLocation *string `json:"computeLocation,omitempty"`
+ // ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - READ-ONLY; The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the underlying compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - READ-ONLY; Errors during provisioning
+ ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
+ // IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
+ IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+func unmarshalBasicCompute(body []byte) (BasicCompute, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["computeType"] {
+ case string(ComputeTypeAKS1):
+ var a AKS
+ err := json.Unmarshal(body, &a)
+ return a, err
+ case string(ComputeTypeAmlCompute1):
+ var ac AmlCompute
+ err := json.Unmarshal(body, &ac)
+ return ac, err
+ case string(ComputeTypeVirtualMachine1):
+ var VM VirtualMachine
+ err := json.Unmarshal(body, &VM)
+ return VM, err
+ case string(ComputeTypeHDInsight1):
+ var hi HDInsight
+ err := json.Unmarshal(body, &hi)
+ return hi, err
+ case string(ComputeTypeDataFactory1):
+ var df DataFactory
+ err := json.Unmarshal(body, &df)
+ return df, err
+ case string(ComputeTypeDatabricks1):
+ var d Databricks
+ err := json.Unmarshal(body, &d)
+ return d, err
+ case string(ComputeTypeDataLakeAnalytics1):
+ var dla DataLakeAnalytics
+ err := json.Unmarshal(body, &dla)
+ return dla, err
+ default:
+ var c Compute
+ err := json.Unmarshal(body, &c)
+ return c, err
+ }
+}
+func unmarshalBasicComputeArray(body []byte) ([]BasicCompute, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ cArray := make([]BasicCompute, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ c, err := unmarshalBasicCompute(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ cArray[index] = c
+ }
+ return cArray, nil
+}
+
+// MarshalJSON is the custom marshaler for Compute.
+func (c Compute) MarshalJSON() ([]byte, error) {
+ c.ComputeType = ComputeTypeCompute
+ objectMap := make(map[string]interface{})
+ if c.ComputeLocation != nil {
+ objectMap["computeLocation"] = c.ComputeLocation
+ }
+ if c.Description != nil {
+ objectMap["description"] = c.Description
+ }
+ if c.ResourceID != nil {
+ objectMap["resourceId"] = c.ResourceID
+ }
+ if c.ComputeType != "" {
+ objectMap["computeType"] = c.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for Compute.
+func (c Compute) AsAKS() (*AKS, bool) {
+ return nil, false
+}
+
+// AsAmlCompute is the BasicCompute implementation for Compute.
+func (c Compute) AsAmlCompute() (*AmlCompute, bool) {
+ return nil, false
+}
+
+// AsVirtualMachine is the BasicCompute implementation for Compute.
+func (c Compute) AsVirtualMachine() (*VirtualMachine, bool) {
+ return nil, false
+}
+
+// AsHDInsight is the BasicCompute implementation for Compute.
+func (c Compute) AsHDInsight() (*HDInsight, bool) {
+ return nil, false
+}
+
+// AsDataFactory is the BasicCompute implementation for Compute.
+func (c Compute) AsDataFactory() (*DataFactory, bool) {
+ return nil, false
+}
+
+// AsDatabricks is the BasicCompute implementation for Compute.
+func (c Compute) AsDatabricks() (*Databricks, bool) {
+ return nil, false
+}
+
+// AsDataLakeAnalytics is the BasicCompute implementation for Compute.
+func (c Compute) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
+ return nil, false
+}
+
+// AsCompute is the BasicCompute implementation for Compute.
+func (c Compute) AsCompute() (*Compute, bool) {
+ return &c, true
+}
+
+// AsBasicCompute is the BasicCompute implementation for Compute.
+func (c Compute) AsBasicCompute() (BasicCompute, bool) {
+ return &c, true
+}
+
+// BasicComputeNodesInformation compute nodes information related to a Machine Learning compute. Might differ for every
+// type of compute.
+type BasicComputeNodesInformation interface {
+ AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool)
+ AsComputeNodesInformation() (*ComputeNodesInformation, bool)
+}
+
+// ComputeNodesInformation compute nodes information related to a Machine Learning compute. Might differ for
+// every type of compute.
+type ComputeNodesInformation struct {
+ // NextLink - READ-ONLY; The continuation token.
+ NextLink *string `json:"nextLink,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation', 'ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute'
+ ComputeType ComputeTypeBasicComputeNodesInformation `json:"computeType,omitempty"`
+}
+
+func unmarshalBasicComputeNodesInformation(body []byte) (BasicComputeNodesInformation, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["computeType"] {
+ case string(ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute):
+ var acni AmlComputeNodesInformation
+ err := json.Unmarshal(body, &acni)
+ return acni, err
+ default:
+ var cni ComputeNodesInformation
+ err := json.Unmarshal(body, &cni)
+ return cni, err
+ }
+}
+func unmarshalBasicComputeNodesInformationArray(body []byte) ([]BasicComputeNodesInformation, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ cniArray := make([]BasicComputeNodesInformation, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ cni, err := unmarshalBasicComputeNodesInformation(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ cniArray[index] = cni
+ }
+ return cniArray, nil
+}
+
+// MarshalJSON is the custom marshaler for ComputeNodesInformation.
+func (cni ComputeNodesInformation) MarshalJSON() ([]byte, error) {
+ cni.ComputeType = ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation
+ objectMap := make(map[string]interface{})
+ if cni.ComputeType != "" {
+ objectMap["computeType"] = cni.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAmlComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
+func (cni ComputeNodesInformation) AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool) {
+ return nil, false
+}
+
+// AsComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
+func (cni ComputeNodesInformation) AsComputeNodesInformation() (*ComputeNodesInformation, bool) {
+ return &cni, true
+}
+
+// AsBasicComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
+func (cni ComputeNodesInformation) AsBasicComputeNodesInformation() (BasicComputeNodesInformation, bool) {
+ return &cni, true
+}
+
+// ComputeResource machine Learning compute object wrapped into ARM resource envelope.
+type ComputeResource struct {
+ autorest.Response `json:"-"`
+ // Properties - Compute properties
+ Properties BasicCompute `json:"properties,omitempty"`
+ // ID - READ-ONLY; Specifies the resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Specifies the name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Identity - READ-ONLY; The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // Location - Specifies the location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Type - READ-ONLY; Specifies the type of the resource.
+ Type *string `json:"type,omitempty"`
+ // Tags - Contains resource tags defined as key/value pairs.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The sku of the workspace.
+ Sku *Sku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ComputeResource.
+func (cr ComputeResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ objectMap["properties"] = cr.Properties
+ if cr.Location != nil {
+ objectMap["location"] = cr.Location
+ }
+ if cr.Tags != nil {
+ objectMap["tags"] = cr.Tags
+ }
+ if cr.Sku != nil {
+ objectMap["sku"] = cr.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ComputeResource struct.
+func (cr *ComputeResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ properties, err := unmarshalBasicCompute(*v)
+ if err != nil {
+ return err
+ }
+ cr.Properties = properties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ cr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cr.Name = &name
+ }
+ case "identity":
+ if v != nil {
+ var identity Identity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ cr.Identity = &identity
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cr.Location = &location
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cr.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cr.Tags = tags
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ cr.Sku = &sku
+ }
+ }
+ }
+
+ return nil
+}
+
+// BasicComputeSecrets secrets related to a Machine Learning compute. Might differ for every type of compute.
+type BasicComputeSecrets interface {
+ AsAksComputeSecrets() (*AksComputeSecrets, bool)
+ AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool)
+ AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool)
+ AsComputeSecrets() (*ComputeSecrets, bool)
+}
+
+// ComputeSecrets secrets related to a Machine Learning compute. Might differ for every type of compute.
+type ComputeSecrets struct {
+ autorest.Response `json:"-"`
+ // ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
+ ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
+}
+
+func unmarshalBasicComputeSecrets(body []byte) (BasicComputeSecrets, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["computeType"] {
+ case string(ComputeTypeBasicComputeSecretsComputeTypeAKS):
+ var acs AksComputeSecrets
+ err := json.Unmarshal(body, &acs)
+ return acs, err
+ case string(ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine):
+ var vms VirtualMachineSecrets
+ err := json.Unmarshal(body, &vms)
+ return vms, err
+ case string(ComputeTypeBasicComputeSecretsComputeTypeDatabricks):
+ var dcs DatabricksComputeSecrets
+ err := json.Unmarshal(body, &dcs)
+ return dcs, err
+ default:
+ var cs ComputeSecrets
+ err := json.Unmarshal(body, &cs)
+ return cs, err
+ }
+}
+func unmarshalBasicComputeSecretsArray(body []byte) ([]BasicComputeSecrets, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ csArray := make([]BasicComputeSecrets, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ cs, err := unmarshalBasicComputeSecrets(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ csArray[index] = cs
+ }
+ return csArray, nil
+}
+
+// MarshalJSON is the custom marshaler for ComputeSecrets.
+func (cs ComputeSecrets) MarshalJSON() ([]byte, error) {
+ cs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets
+ objectMap := make(map[string]interface{})
+ if cs.ComputeType != "" {
+ objectMap["computeType"] = cs.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAksComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
+func (cs ComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
+func (cs ComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
+ return nil, false
+}
+
+// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
+func (cs ComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
+func (cs ComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
+ return &cs, true
+}
+
+// AsBasicComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
+func (cs ComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
+ return &cs, true
+}
+
+// ComputeSecretsModel ...
+type ComputeSecretsModel struct {
+ autorest.Response `json:"-"`
+ Value BasicComputeSecrets `json:"value,omitempty"`
+}
+
+// UnmarshalJSON is the custom unmarshaler for ComputeSecretsModel struct.
+func (csm *ComputeSecretsModel) UnmarshalJSON(body []byte) error {
+ cs, err := unmarshalBasicComputeSecrets(body)
+ if err != nil {
+ return err
+ }
+ csm.Value = cs
+
+ return nil
+}
+
+// Databricks a DataFactory compute.
+type Databricks struct {
+ Properties *DatabricksProperties `json:"properties,omitempty"`
+ // ComputeLocation - Location for the underlying compute
+ ComputeLocation *string `json:"computeLocation,omitempty"`
+ // ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - READ-ONLY; The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the underlying compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - READ-ONLY; Errors during provisioning
+ ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
+ // IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
+ IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Databricks.
+func (d Databricks) MarshalJSON() ([]byte, error) {
+ d.ComputeType = ComputeTypeDatabricks1
+ objectMap := make(map[string]interface{})
+ if d.Properties != nil {
+ objectMap["properties"] = d.Properties
+ }
+ if d.ComputeLocation != nil {
+ objectMap["computeLocation"] = d.ComputeLocation
+ }
+ if d.Description != nil {
+ objectMap["description"] = d.Description
+ }
+ if d.ResourceID != nil {
+ objectMap["resourceId"] = d.ResourceID
+ }
+ if d.ComputeType != "" {
+ objectMap["computeType"] = d.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for Databricks.
+func (d Databricks) AsAKS() (*AKS, bool) {
+ return nil, false
+}
+
+// AsAmlCompute is the BasicCompute implementation for Databricks.
+func (d Databricks) AsAmlCompute() (*AmlCompute, bool) {
+ return nil, false
+}
+
+// AsVirtualMachine is the BasicCompute implementation for Databricks.
+func (d Databricks) AsVirtualMachine() (*VirtualMachine, bool) {
+ return nil, false
+}
+
+// AsHDInsight is the BasicCompute implementation for Databricks.
+func (d Databricks) AsHDInsight() (*HDInsight, bool) {
+ return nil, false
+}
+
+// AsDataFactory is the BasicCompute implementation for Databricks.
+func (d Databricks) AsDataFactory() (*DataFactory, bool) {
+ return nil, false
+}
+
+// AsDatabricks is the BasicCompute implementation for Databricks.
+func (d Databricks) AsDatabricks() (*Databricks, bool) {
+ return &d, true
+}
+
+// AsDataLakeAnalytics is the BasicCompute implementation for Databricks.
+func (d Databricks) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
+ return nil, false
+}
+
+// AsCompute is the BasicCompute implementation for Databricks.
+func (d Databricks) AsCompute() (*Compute, bool) {
+ return nil, false
+}
+
+// AsBasicCompute is the BasicCompute implementation for Databricks.
+func (d Databricks) AsBasicCompute() (BasicCompute, bool) {
+ return &d, true
+}
+
+// DatabricksComputeSecrets secrets related to a Machine Learning compute based on Databricks.
+type DatabricksComputeSecrets struct {
+ // DatabricksAccessToken - access token for databricks account.
+ DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
+ ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DatabricksComputeSecrets.
+func (dcs DatabricksComputeSecrets) MarshalJSON() ([]byte, error) {
+ dcs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeDatabricks
+ objectMap := make(map[string]interface{})
+ if dcs.DatabricksAccessToken != nil {
+ objectMap["databricksAccessToken"] = dcs.DatabricksAccessToken
+ }
+ if dcs.ComputeType != "" {
+ objectMap["computeType"] = dcs.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAksComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
+func (dcs DatabricksComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
+func (dcs DatabricksComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
+ return nil, false
+}
+
+// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
+func (dcs DatabricksComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
+ return &dcs, true
+}
+
+// AsComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
+func (dcs DatabricksComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsBasicComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
+func (dcs DatabricksComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
+ return &dcs, true
+}
+
+// DatabricksProperties ...
+type DatabricksProperties struct {
+ // DatabricksAccessToken - Databricks access token
+ DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"`
+}
+
+// DataFactory a DataFactory compute.
+type DataFactory struct {
+ // ComputeLocation - Location for the underlying compute
+ ComputeLocation *string `json:"computeLocation,omitempty"`
+ // ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - READ-ONLY; The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the underlying compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - READ-ONLY; Errors during provisioning
+ ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
+ // IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
+ IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DataFactory.
+func (df DataFactory) MarshalJSON() ([]byte, error) {
+ df.ComputeType = ComputeTypeDataFactory1
+ objectMap := make(map[string]interface{})
+ if df.ComputeLocation != nil {
+ objectMap["computeLocation"] = df.ComputeLocation
+ }
+ if df.Description != nil {
+ objectMap["description"] = df.Description
+ }
+ if df.ResourceID != nil {
+ objectMap["resourceId"] = df.ResourceID
+ }
+ if df.ComputeType != "" {
+ objectMap["computeType"] = df.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsAKS() (*AKS, bool) {
+ return nil, false
+}
+
+// AsAmlCompute is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsAmlCompute() (*AmlCompute, bool) {
+ return nil, false
+}
+
+// AsVirtualMachine is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsVirtualMachine() (*VirtualMachine, bool) {
+ return nil, false
+}
+
+// AsHDInsight is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsHDInsight() (*HDInsight, bool) {
+ return nil, false
+}
+
+// AsDataFactory is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsDataFactory() (*DataFactory, bool) {
+ return &df, true
+}
+
+// AsDatabricks is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsDatabricks() (*Databricks, bool) {
+ return nil, false
+}
+
+// AsDataLakeAnalytics is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
+ return nil, false
+}
+
+// AsCompute is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsCompute() (*Compute, bool) {
+ return nil, false
+}
+
+// AsBasicCompute is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsBasicCompute() (BasicCompute, bool) {
+ return &df, true
+}
+
+// DataLakeAnalytics a DataLakeAnalytics compute.
+type DataLakeAnalytics struct {
+ Properties *DataLakeAnalyticsProperties `json:"properties,omitempty"`
+ // ComputeLocation - Location for the underlying compute
+ ComputeLocation *string `json:"computeLocation,omitempty"`
+ // ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - READ-ONLY; The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the underlying compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - READ-ONLY; Errors during provisioning
+ ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
+ // IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
+ IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DataLakeAnalytics.
+func (dla DataLakeAnalytics) MarshalJSON() ([]byte, error) {
+ dla.ComputeType = ComputeTypeDataLakeAnalytics1
+ objectMap := make(map[string]interface{})
+ if dla.Properties != nil {
+ objectMap["properties"] = dla.Properties
+ }
+ if dla.ComputeLocation != nil {
+ objectMap["computeLocation"] = dla.ComputeLocation
+ }
+ if dla.Description != nil {
+ objectMap["description"] = dla.Description
+ }
+ if dla.ResourceID != nil {
+ objectMap["resourceId"] = dla.ResourceID
+ }
+ if dla.ComputeType != "" {
+ objectMap["computeType"] = dla.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for DataLakeAnalytics.
+func (dla DataLakeAnalytics) AsAKS() (*AKS, bool) {
+ return nil, false
+}
+
+// AsAmlCompute is the BasicCompute implementation for DataLakeAnalytics.
+func (dla DataLakeAnalytics) AsAmlCompute() (*AmlCompute, bool) {
+ return nil, false
+}
+
+// AsVirtualMachine is the BasicCompute implementation for DataLakeAnalytics.
+func (dla DataLakeAnalytics) AsVirtualMachine() (*VirtualMachine, bool) {
+ return nil, false
+}
+
+// AsHDInsight is the BasicCompute implementation for DataLakeAnalytics.
+func (dla DataLakeAnalytics) AsHDInsight() (*HDInsight, bool) {
+ return nil, false
+}
+
+// AsDataFactory is the BasicCompute implementation for DataLakeAnalytics.
+func (dla DataLakeAnalytics) AsDataFactory() (*DataFactory, bool) {
+ return nil, false
+}
+
+// AsDatabricks is the BasicCompute implementation for DataLakeAnalytics.
+func (dla DataLakeAnalytics) AsDatabricks() (*Databricks, bool) {
+ return nil, false
+}
+
+// AsDataLakeAnalytics is the BasicCompute implementation for DataLakeAnalytics.
+func (dla DataLakeAnalytics) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
+ return &dla, true
+}
+
+// AsCompute is the BasicCompute implementation for DataLakeAnalytics.
+func (dla DataLakeAnalytics) AsCompute() (*Compute, bool) {
+ return nil, false
+}
+
+// AsBasicCompute is the BasicCompute implementation for DataLakeAnalytics.
+func (dla DataLakeAnalytics) AsBasicCompute() (BasicCompute, bool) {
+ return &dla, true
+}
+
+// DataLakeAnalyticsProperties ...
+type DataLakeAnalyticsProperties struct {
+ // DataLakeStoreAccountName - DataLake Store Account Name
+ DataLakeStoreAccountName *string `json:"dataLakeStoreAccountName,omitempty"`
+}
+
+// Error wrapper for error response to follow ARM guidelines.
+type Error struct {
+ // Error - READ-ONLY; The error response.
+ Error *ErrorResponse `json:"error,omitempty"`
+}
+
+// ErrorDetail error detail information.
+type ErrorDetail struct {
+ // Code - Error code.
+ Code *string `json:"code,omitempty"`
+ // Message - Error message.
+ Message *string `json:"message,omitempty"`
+}
+
+// ErrorResponse error response information.
+type ErrorResponse struct {
+ // Code - READ-ONLY; Error code.
+ Code *string `json:"code,omitempty"`
+ // Message - READ-ONLY; Error message.
+ Message *string `json:"message,omitempty"`
+ // Details - READ-ONLY; An array of error detail objects.
+ Details *[]ErrorDetail `json:"details,omitempty"`
+}
+
+// HDInsight a HDInsight compute.
+type HDInsight struct {
+ Properties *HDInsightProperties `json:"properties,omitempty"`
+ // ComputeLocation - Location for the underlying compute
+ ComputeLocation *string `json:"computeLocation,omitempty"`
+ // ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - READ-ONLY; The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the underlying compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - READ-ONLY; Errors during provisioning
+ ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
+ // IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
+ IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for HDInsight.
+func (hi HDInsight) MarshalJSON() ([]byte, error) {
+ hi.ComputeType = ComputeTypeHDInsight1
+ objectMap := make(map[string]interface{})
+ if hi.Properties != nil {
+ objectMap["properties"] = hi.Properties
+ }
+ if hi.ComputeLocation != nil {
+ objectMap["computeLocation"] = hi.ComputeLocation
+ }
+ if hi.Description != nil {
+ objectMap["description"] = hi.Description
+ }
+ if hi.ResourceID != nil {
+ objectMap["resourceId"] = hi.ResourceID
+ }
+ if hi.ComputeType != "" {
+ objectMap["computeType"] = hi.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for HDInsight.
+func (hi HDInsight) AsAKS() (*AKS, bool) {
+ return nil, false
+}
+
+// AsAmlCompute is the BasicCompute implementation for HDInsight.
+func (hi HDInsight) AsAmlCompute() (*AmlCompute, bool) {
+ return nil, false
+}
+
+// AsVirtualMachine is the BasicCompute implementation for HDInsight.
+func (hi HDInsight) AsVirtualMachine() (*VirtualMachine, bool) {
+ return nil, false
+}
+
+// AsHDInsight is the BasicCompute implementation for HDInsight.
+func (hi HDInsight) AsHDInsight() (*HDInsight, bool) {
+ return &hi, true
+}
+
+// AsDataFactory is the BasicCompute implementation for HDInsight.
+func (hi HDInsight) AsDataFactory() (*DataFactory, bool) {
+ return nil, false
+}
+
+// AsDatabricks is the BasicCompute implementation for HDInsight.
+func (hi HDInsight) AsDatabricks() (*Databricks, bool) {
+ return nil, false
+}
+
+// AsDataLakeAnalytics is the BasicCompute implementation for HDInsight.
+func (hi HDInsight) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
+ return nil, false
+}
+
+// AsCompute is the BasicCompute implementation for HDInsight.
+func (hi HDInsight) AsCompute() (*Compute, bool) {
+ return nil, false
+}
+
+// AsBasicCompute is the BasicCompute implementation for HDInsight.
+func (hi HDInsight) AsBasicCompute() (BasicCompute, bool) {
+ return &hi, true
+}
+
+// HDInsightProperties ...
+type HDInsightProperties struct {
+ // SSHPort - Port open for ssh connections on the master node of the cluster.
+ SSHPort *int32 `json:"sshPort,omitempty"`
+ // Address - Public IP address of the master node of the cluster.
+ Address *string `json:"address,omitempty"`
+ // AdministratorAccount - Admin credentials for master node of the cluster
+ AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
+}
+
+// Identity identity for the resource.
+type Identity struct {
+ // PrincipalID - READ-ONLY; The principal ID of resource identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant ID of resource.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The identity type. Possible values include: 'SystemAssigned'
+ Type ResourceIdentityType `json:"type,omitempty"`
+}
+
+// ListAmlUserFeatureResult the List Aml user feature operation response.
+type ListAmlUserFeatureResult struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; The list of AML user facing features.
+ Value *[]AmlUserFeature `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next page of AML user features information.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListAmlUserFeatureResultIterator provides access to a complete listing of AmlUserFeature values.
+type ListAmlUserFeatureResultIterator struct {
+ i int
+ page ListAmlUserFeatureResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ListAmlUserFeatureResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListAmlUserFeatureResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListAmlUserFeatureResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListAmlUserFeatureResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ListAmlUserFeatureResultIterator) Response() ListAmlUserFeatureResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ListAmlUserFeatureResultIterator) Value() AmlUserFeature {
+ if !iter.page.NotDone() {
+ return AmlUserFeature{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ListAmlUserFeatureResultIterator type.
+func NewListAmlUserFeatureResultIterator(page ListAmlUserFeatureResultPage) ListAmlUserFeatureResultIterator {
+ return ListAmlUserFeatureResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (laufr ListAmlUserFeatureResult) IsEmpty() bool {
+ return laufr.Value == nil || len(*laufr.Value) == 0
+}
+
+// listAmlUserFeatureResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (laufr ListAmlUserFeatureResult) listAmlUserFeatureResultPreparer(ctx context.Context) (*http.Request, error) {
+ if laufr.NextLink == nil || len(to.String(laufr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(laufr.NextLink)))
+}
+
+// ListAmlUserFeatureResultPage contains a page of AmlUserFeature values.
+type ListAmlUserFeatureResultPage struct {
+ fn func(context.Context, ListAmlUserFeatureResult) (ListAmlUserFeatureResult, error)
+ laufr ListAmlUserFeatureResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ListAmlUserFeatureResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListAmlUserFeatureResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.laufr)
+ if err != nil {
+ return err
+ }
+ page.laufr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListAmlUserFeatureResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListAmlUserFeatureResultPage) NotDone() bool {
+ return !page.laufr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListAmlUserFeatureResultPage) Response() ListAmlUserFeatureResult {
+ return page.laufr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListAmlUserFeatureResultPage) Values() []AmlUserFeature {
+ if page.laufr.IsEmpty() {
+ return nil
+ }
+ return *page.laufr.Value
+}
+
+// Creates a new instance of the ListAmlUserFeatureResultPage type.
+func NewListAmlUserFeatureResultPage(getNextPage func(context.Context, ListAmlUserFeatureResult) (ListAmlUserFeatureResult, error)) ListAmlUserFeatureResultPage {
+ return ListAmlUserFeatureResultPage{fn: getNextPage}
+}
+
+// ListUsagesResult the List Usages operation response.
+type ListUsagesResult struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; The list of AML resource usages.
+ Value *[]Usage `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next page of AML resource usage information.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListUsagesResultIterator provides access to a complete listing of Usage values.
+type ListUsagesResultIterator struct {
+ i int
+ page ListUsagesResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListUsagesResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListUsagesResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ListUsagesResultIterator) Response() ListUsagesResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ListUsagesResultIterator) Value() Usage {
+ if !iter.page.NotDone() {
+ return Usage{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ListUsagesResultIterator type.
+func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
+ return ListUsagesResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lur ListUsagesResult) IsEmpty() bool {
+ return lur.Value == nil || len(*lur.Value) == 0
+}
+
+// listUsagesResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
+ if lur.NextLink == nil || len(to.String(lur.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lur.NextLink)))
+}
+
+// ListUsagesResultPage contains a page of Usage values.
+type ListUsagesResultPage struct {
+ fn func(context.Context, ListUsagesResult) (ListUsagesResult, error)
+ lur ListUsagesResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lur)
+ if err != nil {
+ return err
+ }
+ page.lur = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListUsagesResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListUsagesResultPage) NotDone() bool {
+ return !page.lur.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListUsagesResultPage) Response() ListUsagesResult {
+ return page.lur
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListUsagesResultPage) Values() []Usage {
+ if page.lur.IsEmpty() {
+ return nil
+ }
+ return *page.lur.Value
+}
+
+// Creates a new instance of the ListUsagesResultPage type.
+func NewListUsagesResultPage(getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
+ return ListUsagesResultPage{fn: getNextPage}
+}
+
+// ListWorkspaceKeysResult ...
+type ListWorkspaceKeysResult struct {
+ autorest.Response `json:"-"`
+ // UserStorageKey - READ-ONLY
+ UserStorageKey *string `json:"userStorageKey,omitempty"`
+ // UserStorageResourceID - READ-ONLY
+ UserStorageResourceID *string `json:"userStorageResourceId,omitempty"`
+ // AppInsightsInstrumentationKey - READ-ONLY
+ AppInsightsInstrumentationKey *string `json:"appInsightsInstrumentationKey,omitempty"`
+ // ContainerRegistryCredentials - READ-ONLY
+ ContainerRegistryCredentials *RegistryListCredentialsResult `json:"containerRegistryCredentials,omitempty"`
+}
+
+// ListWorkspaceQuotas the List WorkspaceQuotasByVMFamily operation response.
+type ListWorkspaceQuotas struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; The list of Workspace Quotas by VM Family
+ Value *[]ResourceQuota `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch the next page of Workspace Quota information.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListWorkspaceQuotasIterator provides access to a complete listing of ResourceQuota values.
+type ListWorkspaceQuotasIterator struct {
+ i int
+ page ListWorkspaceQuotasPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ListWorkspaceQuotasIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListWorkspaceQuotasIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListWorkspaceQuotasIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListWorkspaceQuotasIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ListWorkspaceQuotasIterator) Response() ListWorkspaceQuotas {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ListWorkspaceQuotasIterator) Value() ResourceQuota {
+ if !iter.page.NotDone() {
+ return ResourceQuota{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ListWorkspaceQuotasIterator type.
+func NewListWorkspaceQuotasIterator(page ListWorkspaceQuotasPage) ListWorkspaceQuotasIterator {
+ return ListWorkspaceQuotasIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lwq ListWorkspaceQuotas) IsEmpty() bool {
+ return lwq.Value == nil || len(*lwq.Value) == 0
+}
+
+// listWorkspaceQuotasPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lwq ListWorkspaceQuotas) listWorkspaceQuotasPreparer(ctx context.Context) (*http.Request, error) {
+ if lwq.NextLink == nil || len(to.String(lwq.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lwq.NextLink)))
+}
+
+// ListWorkspaceQuotasPage contains a page of ResourceQuota values.
+type ListWorkspaceQuotasPage struct {
+ fn func(context.Context, ListWorkspaceQuotas) (ListWorkspaceQuotas, error)
+ lwq ListWorkspaceQuotas
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ListWorkspaceQuotasPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListWorkspaceQuotasPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lwq)
+ if err != nil {
+ return err
+ }
+ page.lwq = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListWorkspaceQuotasPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListWorkspaceQuotasPage) NotDone() bool {
+ return !page.lwq.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListWorkspaceQuotasPage) Response() ListWorkspaceQuotas {
+ return page.lwq
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListWorkspaceQuotasPage) Values() []ResourceQuota {
+ if page.lwq.IsEmpty() {
+ return nil
+ }
+ return *page.lwq.Value
+}
+
+// Creates a new instance of the ListWorkspaceQuotasPage type.
+func NewListWorkspaceQuotasPage(getNextPage func(context.Context, ListWorkspaceQuotas) (ListWorkspaceQuotas, error)) ListWorkspaceQuotasPage {
+ return ListWorkspaceQuotasPage{fn: getNextPage}
+}
+
+// MachineLearningComputeCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type MachineLearningComputeCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *MachineLearningComputeCreateOrUpdateFuture) Result(client MachineLearningComputeClient) (cr ComputeResource, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("machinelearningservices.MachineLearningComputeCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
+ cr, err = client.CreateOrUpdateResponder(cr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeCreateOrUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// MachineLearningComputeDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type MachineLearningComputeDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *MachineLearningComputeDeleteFuture) Result(client MachineLearningComputeClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("machinelearningservices.MachineLearningComputeDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// MachineLearningComputeUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type MachineLearningComputeUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *MachineLearningComputeUpdateFuture) Result(client MachineLearningComputeClient) (cr ComputeResource, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("machinelearningservices.MachineLearningComputeUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
+ cr, err = client.UpdateResponder(cr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// NodeStateCounts counts of various compute node states on the amlCompute.
+type NodeStateCounts struct {
+ // IdleNodeCount - READ-ONLY; Number of compute nodes in idle state.
+ IdleNodeCount *int32 `json:"idleNodeCount,omitempty"`
+ // RunningNodeCount - READ-ONLY; Number of compute nodes which are running jobs.
+ RunningNodeCount *int32 `json:"runningNodeCount,omitempty"`
+ // PreparingNodeCount - READ-ONLY; Number of compute nodes which are being prepared.
+ PreparingNodeCount *int32 `json:"preparingNodeCount,omitempty"`
+ // UnusableNodeCount - READ-ONLY; Number of compute nodes which are in unusable state.
+ UnusableNodeCount *int32 `json:"unusableNodeCount,omitempty"`
+ // LeavingNodeCount - READ-ONLY; Number of compute nodes which are leaving the amlCompute.
+ LeavingNodeCount *int32 `json:"leavingNodeCount,omitempty"`
+ // PreemptedNodeCount - READ-ONLY; Number of compute nodes which are in preempted state.
+ PreemptedNodeCount *int32 `json:"preemptedNodeCount,omitempty"`
+}
+
+// Operation azure Machine Learning workspace REST API operation
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{operation}
+ Name *string `json:"name,omitempty"`
+ // Display - Display name of operation
+ Display *OperationDisplay `json:"display,omitempty"`
+}
+
+// OperationDisplay display name of operation
+type OperationDisplay struct {
+ // Provider - The resource provider name: Microsoft.MachineLearningExperimentation
+ Provider *string `json:"provider,omitempty"`
+ // Resource - The resource on which the operation is performed.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - The operation that users can perform.
+ Operation *string `json:"operation,omitempty"`
+ // Description - The description for the operation.
+ Description *string `json:"description,omitempty"`
+}
+
+// OperationListResult an array of operations supported by the resource provider.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of AML workspace operations supported by the AML workspace resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+}
+
+// PaginatedComputeResourcesList paginated list of Machine Learning compute objects wrapped in ARM resource
+// envelope.
+type PaginatedComputeResourcesList struct {
+ autorest.Response `json:"-"`
+ // Value - An array of Machine Learning compute objects wrapped in ARM resource envelope.
+ Value *[]ComputeResource `json:"value,omitempty"`
+ // NextLink - A continuation link (absolute URI) to the next page of results in the list.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// PaginatedComputeResourcesListIterator provides access to a complete listing of ComputeResource values.
+type PaginatedComputeResourcesListIterator struct {
+ i int
+ page PaginatedComputeResourcesListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *PaginatedComputeResourcesListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PaginatedComputeResourcesListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *PaginatedComputeResourcesListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter PaginatedComputeResourcesListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter PaginatedComputeResourcesListIterator) Response() PaginatedComputeResourcesList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter PaginatedComputeResourcesListIterator) Value() ComputeResource {
+ if !iter.page.NotDone() {
+ return ComputeResource{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the PaginatedComputeResourcesListIterator type.
+func NewPaginatedComputeResourcesListIterator(page PaginatedComputeResourcesListPage) PaginatedComputeResourcesListIterator {
+ return PaginatedComputeResourcesListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (pcrl PaginatedComputeResourcesList) IsEmpty() bool {
+ return pcrl.Value == nil || len(*pcrl.Value) == 0
+}
+
+// paginatedComputeResourcesListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (pcrl PaginatedComputeResourcesList) paginatedComputeResourcesListPreparer(ctx context.Context) (*http.Request, error) {
+ if pcrl.NextLink == nil || len(to.String(pcrl.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(pcrl.NextLink)))
+}
+
+// PaginatedComputeResourcesListPage contains a page of ComputeResource values.
+type PaginatedComputeResourcesListPage struct {
+ fn func(context.Context, PaginatedComputeResourcesList) (PaginatedComputeResourcesList, error)
+ pcrl PaginatedComputeResourcesList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *PaginatedComputeResourcesListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PaginatedComputeResourcesListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.pcrl)
+ if err != nil {
+ return err
+ }
+ page.pcrl = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *PaginatedComputeResourcesListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page PaginatedComputeResourcesListPage) NotDone() bool {
+ return !page.pcrl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page PaginatedComputeResourcesListPage) Response() PaginatedComputeResourcesList {
+ return page.pcrl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page PaginatedComputeResourcesListPage) Values() []ComputeResource {
+ if page.pcrl.IsEmpty() {
+ return nil
+ }
+ return *page.pcrl.Value
+}
+
+// Creates a new instance of the PaginatedComputeResourcesListPage type.
+func NewPaginatedComputeResourcesListPage(getNextPage func(context.Context, PaginatedComputeResourcesList) (PaginatedComputeResourcesList, error)) PaginatedComputeResourcesListPage {
+ return PaginatedComputeResourcesListPage{fn: getNextPage}
+}
+
+// Password ...
+type Password struct {
+ // Name - READ-ONLY
+ Name *string `json:"name,omitempty"`
+ // Value - READ-ONLY
+ Value *string `json:"value,omitempty"`
+}
+
+// QuotaBaseProperties the properties for Quota update or retrieval.
+type QuotaBaseProperties struct {
+ // ID - Specifies the resource ID.
+ ID *string `json:"id,omitempty"`
+ // Type - Specifies the resource type.
+ Type *string `json:"type,omitempty"`
+ // Limit - The maximum permitted quota of the resource.
+ Limit *int64 `json:"limit,omitempty"`
+ // Unit - An enum describing the unit of quota measurement. Possible values include: 'Count'
+ Unit QuotaUnit `json:"unit,omitempty"`
+}
+
+// QuotaUpdateParameters quota update parameters.
+type QuotaUpdateParameters struct {
+ // Value - The list for update quota.
+ Value *[]QuotaBaseProperties `json:"value,omitempty"`
+}
+
+// RegistryListCredentialsResult ...
+type RegistryListCredentialsResult struct {
+ // Location - READ-ONLY
+ Location *string `json:"location,omitempty"`
+ // Username - READ-ONLY
+ Username *string `json:"username,omitempty"`
+ Passwords *[]Password `json:"passwords,omitempty"`
+}
+
+// Resource azure Resource Manager resource envelope.
+type Resource struct {
+ // ID - READ-ONLY; Specifies the resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Specifies the name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Identity - READ-ONLY; The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // Location - Specifies the location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Type - READ-ONLY; Specifies the type of the resource.
+ Type *string `json:"type,omitempty"`
+ // Tags - Contains resource tags defined as key/value pairs.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The sku of the workspace.
+ Sku *Sku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ if r.Sku != nil {
+ objectMap["sku"] = r.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// ResourceID represents a resource ID. For example, for a subnet, it is the resource URL for the subnet.
+type ResourceID struct {
+ // ID - The ID of the resource
+ ID *string `json:"id,omitempty"`
+}
+
+// ResourceName the Resource Name.
+type ResourceName struct {
+ // Value - READ-ONLY; The name of the resource.
+ Value *string `json:"value,omitempty"`
+ // LocalizedValue - READ-ONLY; The localized name of the resource.
+ LocalizedValue *string `json:"localizedValue,omitempty"`
+}
+
+// ResourceQuota the quota assigned to a resource.
+type ResourceQuota struct {
+ // ID - READ-ONLY; Specifies the resource ID.
+ ID *string `json:"id,omitempty"`
+ // Type - READ-ONLY; Specifies the resource type.
+ Type *string `json:"type,omitempty"`
+ // Name - READ-ONLY; Name of the resource.
+ Name *ResourceName `json:"name,omitempty"`
+ // Limit - READ-ONLY; The maximum permitted quota of the resource.
+ Limit *int64 `json:"limit,omitempty"`
+ // Unit - READ-ONLY; An enum describing the unit of quota measurement. Possible values include: 'Count'
+ Unit QuotaUnit `json:"unit,omitempty"`
+}
+
+// ResourceSkuLocationInfo ...
+type ResourceSkuLocationInfo struct {
+ // Location - READ-ONLY; Location of the SKU
+ Location *string `json:"location,omitempty"`
+ // Zones - READ-ONLY; List of availability zones where the SKU is supported.
+ Zones *[]string `json:"zones,omitempty"`
+ // ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones.
+ ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
+}
+
+// ResourceSkuZoneDetails describes The zonal capabilities of a SKU.
+type ResourceSkuZoneDetails struct {
+ // Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
+ Name *[]string `json:"name,omitempty"`
+ // Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
+ Capabilities *[]SKUCapability `json:"capabilities,omitempty"`
+}
+
+// Restriction the restriction because of which SKU cannot be used.
+type Restriction struct {
+ // Type - READ-ONLY; The type of restrictions. As of now only possible value for this is location.
+ Type *string `json:"type,omitempty"`
+ // Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
+ Values *[]string `json:"values,omitempty"`
+ // ReasonCode - The reason for the restriction. Possible values include: 'NotSpecified', 'NotAvailableForRegion', 'NotAvailableForSubscription'
+ ReasonCode ReasonCode `json:"reasonCode,omitempty"`
+}
+
+// ScaleSettings scale settings for AML Compute
+type ScaleSettings struct {
+ // MaxNodeCount - Max number of nodes to use
+ MaxNodeCount *int32 `json:"maxNodeCount,omitempty"`
+ // MinNodeCount - Min number of nodes to use
+ MinNodeCount *int32 `json:"minNodeCount,omitempty"`
+ // NodeIdleTimeBeforeScaleDown - Node Idle Time before scaling down amlCompute
+ NodeIdleTimeBeforeScaleDown *string `json:"nodeIdleTimeBeforeScaleDown,omitempty"`
+}
+
+// ServicePrincipalCredentials service principal credentials.
+type ServicePrincipalCredentials struct {
+ // ClientID - Client Id
+ ClientID *string `json:"clientId,omitempty"`
+ // ClientSecret - Client secret
+ ClientSecret *string `json:"clientSecret,omitempty"`
+}
+
+// Sku sku of the resource
+type Sku struct {
+ // Name - Name of the sku
+ Name *string `json:"name,omitempty"`
+ // Tier - Tier of the sku like Basic or Enterprise
+ Tier *string `json:"tier,omitempty"`
+}
+
+// SKUCapability features/user capabilities associated with the sku
+type SKUCapability struct {
+ // Name - Capability/Feature ID
+ Name *string `json:"name,omitempty"`
+ // Value - Details about the feature/capability
+ Value *string `json:"value,omitempty"`
+}
+
+// SkuListResult list of skus with features
+type SkuListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]WorkspaceSku `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of Workspace Skus. Call ListNext() with this URI to fetch the next page of Workspace Skus
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SkuListResultIterator provides access to a complete listing of WorkspaceSku values.
+type SkuListResultIterator struct {
+ i int
+ page SkuListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SkuListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SkuListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SkuListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SkuListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SkuListResultIterator) Response() SkuListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SkuListResultIterator) Value() WorkspaceSku {
+ if !iter.page.NotDone() {
+ return WorkspaceSku{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SkuListResultIterator type.
+func NewSkuListResultIterator(page SkuListResultPage) SkuListResultIterator {
+ return SkuListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (slr SkuListResult) IsEmpty() bool {
+ return slr.Value == nil || len(*slr.Value) == 0
+}
+
+// skuListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (slr SkuListResult) skuListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(slr.NextLink)))
+}
+
+// SkuListResultPage contains a page of WorkspaceSku values.
+type SkuListResultPage struct {
+ fn func(context.Context, SkuListResult) (SkuListResult, error)
+ slr SkuListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SkuListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SkuListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.slr)
+ if err != nil {
+ return err
+ }
+ page.slr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SkuListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SkuListResultPage) NotDone() bool {
+ return !page.slr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SkuListResultPage) Response() SkuListResult {
+ return page.slr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SkuListResultPage) Values() []WorkspaceSku {
+ if page.slr.IsEmpty() {
+ return nil
+ }
+ return *page.slr.Value
+}
+
+// Creates a new instance of the SkuListResultPage type.
+func NewSkuListResultPage(getNextPage func(context.Context, SkuListResult) (SkuListResult, error)) SkuListResultPage {
+ return SkuListResultPage{fn: getNextPage}
+}
+
+// SslConfiguration the ssl configuration for scoring
+type SslConfiguration struct {
+ // Status - Enable or disable ssl for scoring. Possible values include: 'Disabled', 'Enabled'
+ Status Status1 `json:"status,omitempty"`
+ // Cert - Cert data
+ Cert *string `json:"cert,omitempty"`
+ // Key - Key data
+ Key *string `json:"key,omitempty"`
+ // Cname - CNAME of the cert
+ Cname *string `json:"cname,omitempty"`
+}
+
+// SystemService a system service running on a compute.
+type SystemService struct {
+ // SystemServiceType - READ-ONLY; The type of this system service.
+ SystemServiceType *string `json:"systemServiceType,omitempty"`
+ // PublicIPAddress - READ-ONLY; Public IP address
+ PublicIPAddress *string `json:"publicIpAddress,omitempty"`
+ // Version - READ-ONLY; The version for this type.
+ Version *string `json:"version,omitempty"`
+}
+
+// UpdateWorkspaceQuotas the properties for update Quota response.
+type UpdateWorkspaceQuotas struct {
+ // ID - READ-ONLY; Specifies the resource ID.
+ ID *string `json:"id,omitempty"`
+ // Type - READ-ONLY; Specifies the resource type.
+ Type *string `json:"type,omitempty"`
+ // Limit - The maximum permitted quota of the resource.
+ Limit *int64 `json:"limit,omitempty"`
+ // Unit - READ-ONLY; An enum describing the unit of quota measurement. Possible values include: 'Count'
+ Unit QuotaUnit `json:"unit,omitempty"`
+ // Status - Status of update workspace quota. Possible values include: 'Undefined', 'Success', 'Failure', 'InvalidQuotaBelowClusterMinimum', 'InvalidQuotaExceedsSubscriptionLimit', 'InvalidVMFamilyName', 'OperationNotSupportedForSku', 'OperationNotEnabledForRegion'
+ Status Status `json:"status,omitempty"`
+}
+
+// UpdateWorkspaceQuotasResult the result of update workspace quota.
+type UpdateWorkspaceQuotasResult struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; The list of workspace quota update result.
+ Value *[]UpdateWorkspaceQuotas `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// Usage describes AML Resource Usage.
+type Usage struct {
+ // ID - READ-ONLY; Specifies the resource ID.
+ ID *string `json:"id,omitempty"`
+ // Type - READ-ONLY; Specifies the resource type.
+ Type *string `json:"type,omitempty"`
+ // Unit - READ-ONLY; An enum describing the unit of usage measurement. Possible values include: 'UsageUnitCount'
+ Unit UsageUnit `json:"unit,omitempty"`
+ // CurrentValue - READ-ONLY; The current usage of the resource.
+ CurrentValue *int64 `json:"currentValue,omitempty"`
+ // Limit - READ-ONLY; The maximum permitted usage of the resource.
+ Limit *int64 `json:"limit,omitempty"`
+ // Name - READ-ONLY; The name of the type of usage.
+ Name *UsageName `json:"name,omitempty"`
+}
+
+// UsageName the Usage Names.
+type UsageName struct {
+ // Value - READ-ONLY; The name of the resource.
+ Value *string `json:"value,omitempty"`
+ // LocalizedValue - READ-ONLY; The localized name of the resource.
+ LocalizedValue *string `json:"localizedValue,omitempty"`
+}
+
+// UserAccountCredentials settings for user account that gets created on each on the nodes of a compute.
+type UserAccountCredentials struct {
+ // AdminUserName - Name of the administrator user account which can be used to SSH to nodes.
+ AdminUserName *string `json:"adminUserName,omitempty"`
+ // AdminUserSSHPublicKey - SSH public key of the administrator user account.
+ AdminUserSSHPublicKey *string `json:"adminUserSshPublicKey,omitempty"`
+ // AdminUserPassword - Password of the administrator user account.
+ AdminUserPassword *string `json:"adminUserPassword,omitempty"`
+}
+
+// VirtualMachine a Machine Learning compute based on Azure Virtual Machines.
+type VirtualMachine struct {
+ Properties *VirtualMachineProperties `json:"properties,omitempty"`
+ // ComputeLocation - Location for the underlying compute
+ ComputeLocation *string `json:"computeLocation,omitempty"`
+ // ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - READ-ONLY; The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the underlying compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - READ-ONLY; Errors during provisioning
+ ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
+ // IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
+ IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachine.
+func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
+ VM.ComputeType = ComputeTypeVirtualMachine1
+ objectMap := make(map[string]interface{})
+ if VM.Properties != nil {
+ objectMap["properties"] = VM.Properties
+ }
+ if VM.ComputeLocation != nil {
+ objectMap["computeLocation"] = VM.ComputeLocation
+ }
+ if VM.Description != nil {
+ objectMap["description"] = VM.Description
+ }
+ if VM.ResourceID != nil {
+ objectMap["resourceId"] = VM.ResourceID
+ }
+ if VM.ComputeType != "" {
+ objectMap["computeType"] = VM.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsAKS() (*AKS, bool) {
+ return nil, false
+}
+
+// AsAmlCompute is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsAmlCompute() (*AmlCompute, bool) {
+ return nil, false
+}
+
+// AsVirtualMachine is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsVirtualMachine() (*VirtualMachine, bool) {
+ return &VM, true
+}
+
+// AsHDInsight is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsHDInsight() (*HDInsight, bool) {
+ return nil, false
+}
+
+// AsDataFactory is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsDataFactory() (*DataFactory, bool) {
+ return nil, false
+}
+
+// AsDatabricks is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsDatabricks() (*Databricks, bool) {
+ return nil, false
+}
+
+// AsDataLakeAnalytics is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
+ return nil, false
+}
+
+// AsCompute is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsCompute() (*Compute, bool) {
+ return nil, false
+}
+
+// AsBasicCompute is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsBasicCompute() (BasicCompute, bool) {
+ return &VM, true
+}
+
+// VirtualMachineProperties ...
+type VirtualMachineProperties struct {
+ // VirtualMachineSize - Virtual Machine size
+ VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
+ // SSHPort - Port open for ssh connections.
+ SSHPort *int32 `json:"sshPort,omitempty"`
+ // Address - Public IP address of the virtual machine.
+ Address *string `json:"address,omitempty"`
+ // AdministratorAccount - Admin credentials for virtual machine
+ AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
+}
+
+// VirtualMachineSecrets secrets related to a Machine Learning compute based on AKS.
+type VirtualMachineSecrets struct {
+ // AdministratorAccount - Admin credentials for virtual machine.
+ AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
+ ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineSecrets.
+func (vms VirtualMachineSecrets) MarshalJSON() ([]byte, error) {
+ vms.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine
+ objectMap := make(map[string]interface{})
+ if vms.AdministratorAccount != nil {
+ objectMap["administratorAccount"] = vms.AdministratorAccount
+ }
+ if vms.ComputeType != "" {
+ objectMap["computeType"] = vms.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAksComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
+func (vms VirtualMachineSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
+func (vms VirtualMachineSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
+ return &vms, true
+}
+
+// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
+func (vms VirtualMachineSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
+func (vms VirtualMachineSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsBasicComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
+func (vms VirtualMachineSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
+ return &vms, true
+}
+
+// VirtualMachineSize describes the properties of a VM size.
+type VirtualMachineSize struct {
+ // Name - READ-ONLY; The name of the virtual machine size.
+ Name *string `json:"name,omitempty"`
+ // Family - READ-ONLY; The family name of the virtual machine size.
+ Family *string `json:"family,omitempty"`
+ // VCPUs - READ-ONLY; The number of vCPUs supported by the virtual machine size.
+ VCPUs *int32 `json:"vCPUs,omitempty"`
+ // Gpus - READ-ONLY; The number of gPUs supported by the virtual machine size.
+ Gpus *int32 `json:"gpus,omitempty"`
+ // OsVhdSizeMB - READ-ONLY; The OS VHD disk size, in MB, allowed by the virtual machine size.
+ OsVhdSizeMB *int32 `json:"osVhdSizeMB,omitempty"`
+ // MaxResourceVolumeMB - READ-ONLY; The resource volume size, in MB, allowed by the virtual machine size.
+ MaxResourceVolumeMB *int32 `json:"maxResourceVolumeMB,omitempty"`
+ // MemoryGB - READ-ONLY; The amount of memory, in GB, supported by the virtual machine size.
+ MemoryGB *float64 `json:"memoryGB,omitempty"`
+ // LowPriorityCapable - READ-ONLY; Specifies if the virtual machine size supports low priority VMs.
+ LowPriorityCapable *bool `json:"lowPriorityCapable,omitempty"`
+ // PremiumIO - READ-ONLY; Specifies if the virtual machine size supports premium IO.
+ PremiumIO *bool `json:"premiumIO,omitempty"`
+}
+
+// VirtualMachineSizeListResult the List Virtual Machine size operation response.
+type VirtualMachineSizeListResult struct {
+ autorest.Response `json:"-"`
+ // AmlCompute - The list of virtual machine sizes supported by AmlCompute.
+ AmlCompute *[]VirtualMachineSize `json:"amlCompute,omitempty"`
+}
+
+// VirtualMachineSSHCredentials admin credentials for virtual machine
+type VirtualMachineSSHCredentials struct {
+ // Username - Username of admin account
+ Username *string `json:"username,omitempty"`
+ // Password - Password of admin account
+ Password *string `json:"password,omitempty"`
+ // PublicKeyData - Public key data
+ PublicKeyData *string `json:"publicKeyData,omitempty"`
+ // PrivateKeyData - Private key data
+ PrivateKeyData *string `json:"privateKeyData,omitempty"`
+}
+
+// Workspace an object that represents a machine learning workspace.
+type Workspace struct {
+ autorest.Response `json:"-"`
+ // WorkspaceProperties - The properties of the machine learning workspace.
+ *WorkspaceProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Specifies the resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Specifies the name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Identity - READ-ONLY; The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // Location - Specifies the location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Type - READ-ONLY; Specifies the type of the resource.
+ Type *string `json:"type,omitempty"`
+ // Tags - Contains resource tags defined as key/value pairs.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The sku of the workspace.
+ Sku *Sku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Workspace.
+func (w Workspace) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if w.WorkspaceProperties != nil {
+ objectMap["properties"] = w.WorkspaceProperties
+ }
+ if w.Location != nil {
+ objectMap["location"] = w.Location
+ }
+ if w.Tags != nil {
+ objectMap["tags"] = w.Tags
+ }
+ if w.Sku != nil {
+ objectMap["sku"] = w.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Workspace struct.
+func (w *Workspace) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var workspaceProperties WorkspaceProperties
+ err = json.Unmarshal(*v, &workspaceProperties)
+ if err != nil {
+ return err
+ }
+ w.WorkspaceProperties = &workspaceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ w.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ w.Name = &name
+ }
+ case "identity":
+ if v != nil {
+ var identity Identity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ w.Identity = &identity
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ w.Location = &location
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ w.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ w.Tags = tags
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ w.Sku = &sku
+ }
+ }
+ }
+
+ return nil
+}
+
+// WorkspaceListResult the result of a request to list machine learning workspaces.
+type WorkspaceListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to request the next list of machine learning workspaces.
+ Value *[]Workspace `json:"value,omitempty"`
+ // NextLink - The URI that can be used to request the next list of machine learning workspaces.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// WorkspaceListResultIterator provides access to a complete listing of Workspace values.
+type WorkspaceListResultIterator struct {
+ i int
+ page WorkspaceListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *WorkspaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WorkspaceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter WorkspaceListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter WorkspaceListResultIterator) Response() WorkspaceListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter WorkspaceListResultIterator) Value() Workspace {
+ if !iter.page.NotDone() {
+ return Workspace{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the WorkspaceListResultIterator type.
+func NewWorkspaceListResultIterator(page WorkspaceListResultPage) WorkspaceListResultIterator {
+ return WorkspaceListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (wlr WorkspaceListResult) IsEmpty() bool {
+ return wlr.Value == nil || len(*wlr.Value) == 0
+}
+
+// workspaceListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (wlr WorkspaceListResult) workspaceListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if wlr.NextLink == nil || len(to.String(wlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(wlr.NextLink)))
+}
+
+// WorkspaceListResultPage contains a page of Workspace values.
+type WorkspaceListResultPage struct {
+ fn func(context.Context, WorkspaceListResult) (WorkspaceListResult, error)
+ wlr WorkspaceListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *WorkspaceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wlr)
+ if err != nil {
+ return err
+ }
+ page.wlr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WorkspaceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page WorkspaceListResultPage) NotDone() bool {
+ return !page.wlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page WorkspaceListResultPage) Response() WorkspaceListResult {
+ return page.wlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page WorkspaceListResultPage) Values() []Workspace {
+ if page.wlr.IsEmpty() {
+ return nil
+ }
+ return *page.wlr.Value
+}
+
+// Creates a new instance of the WorkspaceListResultPage type.
+func NewWorkspaceListResultPage(getNextPage func(context.Context, WorkspaceListResult) (WorkspaceListResult, error)) WorkspaceListResultPage {
+ return WorkspaceListResultPage{fn: getNextPage}
+}
+
+// WorkspaceProperties the properties of a machine learning workspace.
+type WorkspaceProperties struct {
+ // WorkspaceID - READ-ONLY; The immutable id associated with this workspace.
+ WorkspaceID *string `json:"workspaceId,omitempty"`
+ // Description - The description of this workspace.
+ Description *string `json:"description,omitempty"`
+ // FriendlyName - The friendly name for this workspace. This name in mutable
+ FriendlyName *string `json:"friendlyName,omitempty"`
+ // CreationTime - READ-ONLY; The creation time of the machine learning workspace in ISO8601 format.
+ CreationTime *date.Time `json:"creationTime,omitempty"`
+ // KeyVault - ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created
+ KeyVault *string `json:"keyVault,omitempty"`
+ // ApplicationInsights - ARM id of the application insights associated with this workspace. This cannot be changed once the workspace has been created
+ ApplicationInsights *string `json:"applicationInsights,omitempty"`
+ // ContainerRegistry - ARM id of the container registry associated with this workspace. This cannot be changed once the workspace has been created
+ ContainerRegistry *string `json:"containerRegistry,omitempty"`
+ // StorageAccount - ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created
+ StorageAccount *string `json:"storageAccount,omitempty"`
+ // DiscoveryURL - Url for the discovery service to identify regional endpoints for machine learning experimentation services
+ DiscoveryURL *string `json:"discoveryUrl,omitempty"`
+ // ProvisioningState - READ-ONLY; The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+}
+
+// WorkspacePropertiesUpdateParameters the parameters for updating the properties of a machine learning
+// workspace.
+type WorkspacePropertiesUpdateParameters struct {
+ // Description - The description of this workspace.
+ Description *string `json:"description,omitempty"`
+ // FriendlyName - The friendly name for this workspace.
+ FriendlyName *string `json:"friendlyName,omitempty"`
+}
+
+// WorkspaceSku describes Workspace Sku details and features
+type WorkspaceSku struct {
+ // Locations - READ-ONLY; The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.).
+ Locations *[]string `json:"locations,omitempty"`
+ // LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
+ LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
+ // Tier - READ-ONLY; Sku Tier like Basic or Enterprise
+ Tier *string `json:"tier,omitempty"`
+ // ResourceType - READ-ONLY
+ ResourceType *string `json:"resourceType,omitempty"`
+ // Name - READ-ONLY
+ Name *string `json:"name,omitempty"`
+ // Capabilities - READ-ONLY; List of features/user capabilities associated with the sku
+ Capabilities *[]SKUCapability `json:"capabilities,omitempty"`
+ // Restrictions - The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
+ Restrictions *[]Restriction `json:"restrictions,omitempty"`
+}
+
+// WorkspaceUpdateParameters the parameters for updating a machine learning workspace.
+type WorkspaceUpdateParameters struct {
+ // Tags - The resource tags for the machine learning workspace.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The sku of the workspace.
+ Sku *Sku `json:"sku,omitempty"`
+ // WorkspacePropertiesUpdateParameters - The properties that the machine learning workspace will be updated with.
+ *WorkspacePropertiesUpdateParameters `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for WorkspaceUpdateParameters.
+func (wup WorkspaceUpdateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if wup.Tags != nil {
+ objectMap["tags"] = wup.Tags
+ }
+ if wup.Sku != nil {
+ objectMap["sku"] = wup.Sku
+ }
+ if wup.WorkspacePropertiesUpdateParameters != nil {
+ objectMap["properties"] = wup.WorkspacePropertiesUpdateParameters
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for WorkspaceUpdateParameters struct.
+func (wup *WorkspaceUpdateParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ wup.Tags = tags
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ wup.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var workspacePropertiesUpdateParameters WorkspacePropertiesUpdateParameters
+ err = json.Unmarshal(*v, &workspacePropertiesUpdateParameters)
+ if err != nil {
+ return err
+ }
+ wup.WorkspacePropertiesUpdateParameters = &workspacePropertiesUpdateParameters
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/operations.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/operations.go
new file mode 100644
index 000000000000..ac0b4618539a
--- /dev/null
+++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/operations.go
@@ -0,0 +1,109 @@
+package machinelearningservices
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// OperationsClient is the these APIs allow end users to operate on Azure Machine Learning Workspace resources.
+type OperationsClient struct {
+ BaseClient
+}
+
+// NewOperationsClient creates an instance of the OperationsClient client.
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List lists all of the available Azure Machine Learning Workspaces REST API operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.MachineLearningServices/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/quotas.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/quotas.go
new file mode 100644
index 000000000000..37294ebc7a90
--- /dev/null
+++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/quotas.go
@@ -0,0 +1,245 @@
+package machinelearningservices
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// QuotasClient is the these APIs allow end users to operate on Azure Machine Learning Workspace resources.
+type QuotasClient struct {
+ BaseClient
+}
+
+// NewQuotasClient creates an instance of the QuotasClient client.
+func NewQuotasClient(subscriptionID string) QuotasClient {
+ return NewQuotasClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewQuotasClientWithBaseURI creates an instance of the QuotasClient client.
+func NewQuotasClientWithBaseURI(baseURI string, subscriptionID string) QuotasClient {
+ return QuotasClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List gets the currently assigned Workspace Quotas based on VMFamily.
+// Parameters:
+// location - the location for which resource usage is queried.
+func (client QuotasClient) List(ctx context.Context, location string) (result ListWorkspaceQuotasPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QuotasClient.List")
+ defer func() {
+ sc := -1
+ if result.lwq.Response.Response != nil {
+ sc = result.lwq.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("machinelearningservices.QuotasClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.QuotasClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lwq.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.QuotasClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lwq, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.QuotasClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client QuotasClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/Quotas", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client QuotasClient) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client QuotasClient) ListResponder(resp *http.Response) (result ListWorkspaceQuotas, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client QuotasClient) listNextResults(ctx context.Context, lastResults ListWorkspaceQuotas) (result ListWorkspaceQuotas, err error) {
+ req, err := lastResults.listWorkspaceQuotasPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.QuotasClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.QuotasClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.QuotasClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client QuotasClient) ListComplete(ctx context.Context, location string) (result ListWorkspaceQuotasIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QuotasClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, location)
+ return
+}
+
+// Update update quota for each VM family in workspace.
+// Parameters:
+// location - the location for update quota is queried.
+// parameters - quota update parameters.
+func (client QuotasClient) Update(ctx context.Context, location string, parameters QuotaUpdateParameters) (result UpdateWorkspaceQuotasResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QuotasClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("machinelearningservices.QuotasClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, location, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.QuotasClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.QuotasClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.QuotasClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client QuotasClient) UpdatePreparer(ctx context.Context, location string, parameters QuotaUpdateParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ 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}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client QuotasClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client QuotasClient) UpdateResponder(resp *http.Response) (result UpdateWorkspaceQuotasResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/usages.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/usages.go
new file mode 100644
index 000000000000..24e129428c59
--- /dev/null
+++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/usages.go
@@ -0,0 +1,161 @@
+package machinelearningservices
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// UsagesClient is the these APIs allow end users to operate on Azure Machine Learning Workspace resources.
+type UsagesClient struct {
+ BaseClient
+}
+
+// NewUsagesClient creates an instance of the UsagesClient client.
+func NewUsagesClient(subscriptionID string) UsagesClient {
+ return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client.
+func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient {
+ return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List gets the current usage information as well as limits for AML resources for given subscription and location.
+// Parameters:
+// location - the location for which resource usage is queried.
+func (client UsagesClient) List(ctx context.Context, location string) (result ListUsagesResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.List")
+ defer func() {
+ sc := -1
+ if result.lur.Response.Response != nil {
+ sc = result.lur.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("machinelearningservices.UsagesClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.UsagesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lur.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.UsagesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lur, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.UsagesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client UsagesClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsagesClient) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client UsagesClient) ListResponder(resp *http.Response) (result ListUsagesResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client UsagesClient) listNextResults(ctx context.Context, lastResults ListUsagesResult) (result ListUsagesResult, err error) {
+ req, err := lastResults.listUsagesResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.UsagesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.UsagesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.UsagesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client UsagesClient) ListComplete(ctx context.Context, location string) (result ListUsagesResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, location)
+ return
+}
diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/version.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/version.go
new file mode 100644
index 000000000000..ac06eadc9b76
--- /dev/null
+++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/version.go
@@ -0,0 +1,30 @@
+package machinelearningservices
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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.
+
+// UserAgent returns the UserAgent string to use when sending http.Requests.
+func UserAgent() string {
+ return "Azure-SDK-For-Go/" + version.Number + " machinelearningservices/2019-11-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/virtualmachinesizes.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/virtualmachinesizes.go
new file mode 100644
index 000000000000..676292e87790
--- /dev/null
+++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/virtualmachinesizes.go
@@ -0,0 +1,124 @@
+package machinelearningservices
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineSizesClient is the these APIs allow end users to operate on Azure Machine Learning Workspace
+// resources.
+type VirtualMachineSizesClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineSizesClient creates an instance of the VirtualMachineSizesClient client.
+func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClient {
+ return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client.
+func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSizesClient {
+ return VirtualMachineSizesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List returns supported VM Sizes in a location
+// Parameters:
+// location - the location upon which virtual-machine-sizes is queried.
+func (client VirtualMachineSizesClient) List(ctx context.Context, location string) (result VirtualMachineSizeListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSizesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("machinelearningservices.VirtualMachineSizesClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.VirtualMachineSizesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.VirtualMachineSizesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.VirtualMachineSizesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineSizesClient) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineSizesClient) ListResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspacefeatures.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspacefeatures.go
new file mode 100644
index 000000000000..63fd28903762
--- /dev/null
+++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspacefeatures.go
@@ -0,0 +1,156 @@
+package machinelearningservices
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// WorkspaceFeaturesClient is the these APIs allow end users to operate on Azure Machine Learning Workspace resources.
+type WorkspaceFeaturesClient struct {
+ BaseClient
+}
+
+// NewWorkspaceFeaturesClient creates an instance of the WorkspaceFeaturesClient client.
+func NewWorkspaceFeaturesClient(subscriptionID string) WorkspaceFeaturesClient {
+ return NewWorkspaceFeaturesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWorkspaceFeaturesClientWithBaseURI creates an instance of the WorkspaceFeaturesClient client.
+func NewWorkspaceFeaturesClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceFeaturesClient {
+ return WorkspaceFeaturesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List lists all enabled features for a workspace
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+func (client WorkspaceFeaturesClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result ListAmlUserFeatureResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceFeaturesClient.List")
+ defer func() {
+ sc := -1
+ if result.laufr.Response.Response != nil {
+ sc = result.laufr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspaceFeaturesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.laufr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspaceFeaturesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.laufr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspaceFeaturesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client WorkspaceFeaturesClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspaceFeaturesClient) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client WorkspaceFeaturesClient) ListResponder(resp *http.Response) (result ListAmlUserFeatureResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client WorkspaceFeaturesClient) listNextResults(ctx context.Context, lastResults ListAmlUserFeatureResult) (result ListAmlUserFeatureResult, err error) {
+ req, err := lastResults.listAmlUserFeatureResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.WorkspaceFeaturesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.WorkspaceFeaturesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspaceFeaturesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client WorkspaceFeaturesClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result ListAmlUserFeatureResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceFeaturesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName, workspaceName)
+ return
+}
diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspaces.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspaces.go
new file mode 100644
index 000000000000..c46070841a5a
--- /dev/null
+++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspaces.go
@@ -0,0 +1,741 @@
+package machinelearningservices
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// WorkspacesClient is the these APIs allow end users to operate on Azure Machine Learning Workspace resources.
+type WorkspacesClient struct {
+ BaseClient
+}
+
+// NewWorkspacesClient creates an instance of the WorkspacesClient client.
+func NewWorkspacesClient(subscriptionID string) WorkspacesClient {
+ return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client.
+func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) WorkspacesClient {
+ return WorkspacesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a workspace with the specified parameters.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// parameters - the parameters for creating or updating a machine learning workspace.
+func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result Workspace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client WorkspacesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) CreateOrUpdateResponder(resp *http.Response) (result Workspace, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes a machine learning workspace.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+func (client WorkspacesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client WorkspacesClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets the properties of the specified machine learning workspace.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+func (client WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result Workspace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client WorkspacesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) GetSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) GetResponder(resp *http.Response) (result Workspace, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByResourceGroup lists all the available machine learning workspaces under the specified resource group.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// skiptoken - continuation token for pagination.
+func (client WorkspacesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result WorkspaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.wlr.Response.Response != nil {
+ sc = result.wlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.wlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.wlr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client WorkspacesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, skiptoken string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) ListByResourceGroupResponder(resp *http.Response) (result WorkspaceListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client WorkspacesClient) listByResourceGroupNextResults(ctx context.Context, lastResults WorkspaceListResult) (result WorkspaceListResult, err error) {
+ req, err := lastResults.workspaceListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client WorkspacesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skiptoken string) (result WorkspaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, skiptoken)
+ return
+}
+
+// ListBySubscription lists all the available machine learning workspaces under the specified subscription.
+// Parameters:
+// skiptoken - continuation token for pagination.
+func (client WorkspacesClient) ListBySubscription(ctx context.Context, skiptoken string) (result WorkspaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.wlr.Response.Response != nil {
+ sc = result.wlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.wlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.wlr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ListBySubscription", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client WorkspacesClient) ListBySubscriptionPreparer(ctx context.Context, skiptoken string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) ListBySubscriptionResponder(resp *http.Response) (result WorkspaceListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBySubscriptionNextResults retrieves the next set of results, if any.
+func (client WorkspacesClient) listBySubscriptionNextResults(ctx context.Context, lastResults WorkspaceListResult) (result WorkspaceListResult, err error) {
+ req, err := lastResults.workspaceListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client WorkspacesClient) ListBySubscriptionComplete(ctx context.Context, skiptoken string) (result WorkspaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBySubscription(ctx, skiptoken)
+ return
+}
+
+// ListKeys lists all the keys associated with this workspace. This includes keys for the storage account, app insights
+// and password for container registry
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+func (client WorkspacesClient) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result ListWorkspaceKeysResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListKeys")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListKeysPreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ListKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ListKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ListKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListKeysPreparer prepares the ListKeys request.
+func (client WorkspacesClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListKeysSender sends the ListKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) ListKeysSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListKeysResponder handles the response to the ListKeys request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) ListKeysResponder(resp *http.Response) (result ListWorkspaceKeysResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ResyncKeys resync all the keys associated with this workspace. This includes keys for the storage account, app
+// insights and password for container registry
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+func (client WorkspacesClient) ResyncKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ResyncKeys")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ResyncKeysPreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ResyncKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ResyncKeysSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ResyncKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ResyncKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "ResyncKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ResyncKeysPreparer prepares the ResyncKeys request.
+func (client WorkspacesClient) ResyncKeysPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResyncKeysSender sends the ResyncKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) ResyncKeysSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ResyncKeysResponder handles the response to the ResyncKeys request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) ResyncKeysResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update updates a machine learning workspace with the specified parameters.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// parameters - the parameters for updating a machine learning workspace.
+func (client WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspaceUpdateParameters) (result Workspace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client WorkspacesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspaceUpdateParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) UpdateResponder(resp *http.Response) (result Workspace, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/services/network/mgmt/2019-04-01/network/models.go b/services/network/mgmt/2019-04-01/network/models.go
index 8aa70030b245..87d608f3e464 100644
--- a/services/network/mgmt/2019-04-01/network/models.go
+++ b/services/network/mgmt/2019-04-01/network/models.go
@@ -21409,8 +21409,8 @@ type PrivateLinkServiceConnectionState struct {
Status *string `json:"status,omitempty"`
// Description - The reason for approval/rejection of the connection.
Description *string `json:"description,omitempty"`
- // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer.
- ActionRequired *string `json:"actionRequired,omitempty"`
+ // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
+ ActionsRequired *string `json:"actionsRequired,omitempty"`
}
// PrivateLinkServiceIPConfiguration the private link service ip configuration.
diff --git a/services/network/mgmt/2019-06-01/network/models.go b/services/network/mgmt/2019-06-01/network/models.go
index 49f667bf9a30..c5d93eac2258 100644
--- a/services/network/mgmt/2019-06-01/network/models.go
+++ b/services/network/mgmt/2019-06-01/network/models.go
@@ -23123,8 +23123,8 @@ type PrivateLinkServiceConnectionState struct {
Status *string `json:"status,omitempty"`
// Description - The reason for approval/rejection of the connection.
Description *string `json:"description,omitempty"`
- // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer.
- ActionRequired *string `json:"actionRequired,omitempty"`
+ // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
+ ActionsRequired *string `json:"actionsRequired,omitempty"`
}
// PrivateLinkServiceIPConfiguration the private link service ip configuration.
diff --git a/services/network/mgmt/2019-07-01/network/models.go b/services/network/mgmt/2019-07-01/network/models.go
index c0bc4ef5968b..17577eee7046 100644
--- a/services/network/mgmt/2019-07-01/network/models.go
+++ b/services/network/mgmt/2019-07-01/network/models.go
@@ -23185,8 +23185,8 @@ type PrivateLinkServiceConnectionState struct {
Status *string `json:"status,omitempty"`
// Description - The reason for approval/rejection of the connection.
Description *string `json:"description,omitempty"`
- // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer.
- ActionRequired *string `json:"actionRequired,omitempty"`
+ // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
+ ActionsRequired *string `json:"actionsRequired,omitempty"`
}
// PrivateLinkServiceIPConfiguration the private link service ip configuration.
diff --git a/services/network/mgmt/2019-08-01/network/models.go b/services/network/mgmt/2019-08-01/network/models.go
index 305a1b9f754c..8fb81ab6a486 100644
--- a/services/network/mgmt/2019-08-01/network/models.go
+++ b/services/network/mgmt/2019-08-01/network/models.go
@@ -23143,8 +23143,8 @@ type PrivateLinkServiceConnectionState struct {
Status *string `json:"status,omitempty"`
// Description - The reason for approval/rejection of the connection.
Description *string `json:"description,omitempty"`
- // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer.
- ActionRequired *string `json:"actionRequired,omitempty"`
+ // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
+ ActionsRequired *string `json:"actionsRequired,omitempty"`
}
// PrivateLinkServiceIPConfiguration the private link service ip configuration.
diff --git a/services/network/mgmt/2019-09-01/network/ipgroups.go b/services/network/mgmt/2019-09-01/network/ipgroups.go
index 5d6da6c48b57..fc9c39e4b049 100644
--- a/services/network/mgmt/2019-09-01/network/ipgroups.go
+++ b/services/network/mgmt/2019-09-01/network/ipgroups.go
@@ -502,7 +502,7 @@ func (client IPGroupsClient) ListByResourceGroupComplete(ctx context.Context, re
return
}
-// UpdateGroups updates an IpGroups
+// UpdateGroups updates tags of an IpGroups resource.
// Parameters:
// resourceGroupName - the name of the resource group.
// IPGroupsName - the name of the ipGroups.
diff --git a/services/network/mgmt/2019-09-01/network/models.go b/services/network/mgmt/2019-09-01/network/models.go
index 3bf82a37e5e3..087ff4995acf 100644
--- a/services/network/mgmt/2019-09-01/network/models.go
+++ b/services/network/mgmt/2019-09-01/network/models.go
@@ -7295,7 +7295,7 @@ type AzureFirewallPropertiesFormat struct {
HubIPAddresses *HubIPAddresses `json:"hubIpAddresses,omitempty"`
// Sku - The Azure Firewall Resource SKU.
Sku *AzureFirewallSku `json:"sku,omitempty"`
- // AdditionalProperties - The additional properties used to further config this azure firewall
+ // AdditionalProperties - The additional properties used to further config this azure firewall.
AdditionalProperties map[string]*string `json:"additionalProperties"`
}
@@ -17260,7 +17260,7 @@ type IPGroupPropertiesFormat struct {
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// IPAddresses - IpAddresses/IpAddressPrefixes in the IpGroups resource.
IPAddresses *[]string `json:"ipAddresses,omitempty"`
- // Firewalls - READ-ONLY; List of references to Azure resources that this IpGroups is associated with
+ // Firewalls - READ-ONLY; List of references to Azure resources that this IpGroups is associated with.
Firewalls *[]SubResource `json:"firewalls,omitempty"`
}
@@ -23348,8 +23348,8 @@ type PrivateLinkServiceConnectionState struct {
Status *string `json:"status,omitempty"`
// Description - The reason for approval/rejection of the connection.
Description *string `json:"description,omitempty"`
- // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer.
- ActionRequired *string `json:"actionRequired,omitempty"`
+ // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
+ ActionsRequired *string `json:"actionsRequired,omitempty"`
}
// PrivateLinkServiceIPConfiguration the private link service ip configuration.
@@ -28315,9 +28315,9 @@ type TrafficAnalyticsProperties struct {
// TrafficSelectorPolicy an traffic selector policy for a virtual network gateway connection.
type TrafficSelectorPolicy struct {
- // LocalAddressRanges - A collection of local address spaces in CIDR format
+ // LocalAddressRanges - A collection of local address spaces in CIDR format.
LocalAddressRanges *[]string `json:"localAddressRanges,omitempty"`
- // RemoteAddressRanges - A collection of remote address spaces in CIDR format
+ // RemoteAddressRanges - A collection of remote address spaces in CIDR format.
RemoteAddressRanges *[]string `json:"remoteAddressRanges,omitempty"`
}
@@ -28944,11 +28944,11 @@ func (future *VirtualHubRouteTableV2sDeleteFuture) Result(client VirtualHubRoute
// VirtualHubRouteV2 virtualHubRouteTableV2 route.
type VirtualHubRouteV2 struct {
- // DestinationType - The type of destinations
+ // DestinationType - The type of destinations.
DestinationType *string `json:"destinationType,omitempty"`
// Destinations - List of all destinations.
Destinations *[]string `json:"destinations,omitempty"`
- // NextHopType - The type of next hops
+ // NextHopType - The type of next hops.
NextHopType *string `json:"nextHopType,omitempty"`
// NextHops - NextHops ip address.
NextHops *[]string `json:"nextHops,omitempty"`
@@ -29124,9 +29124,9 @@ func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
// VirtualNetworkBgpCommunities bgp Communities sent over ExpressRoute with each route corresponding to a
// prefix in this VNET.
type VirtualNetworkBgpCommunities struct {
- // VirtualNetworkCommunity - The BGP community associated with the virtual network
+ // VirtualNetworkCommunity - The BGP community associated with the virtual network.
VirtualNetworkCommunity *string `json:"virtualNetworkCommunity,omitempty"`
- // RegionalCommunity - READ-ONLY; The BGP community associated with the region of the virtual network
+ // RegionalCommunity - READ-ONLY; The BGP community associated with the region of the virtual network.
RegionalCommunity *string `json:"regionalCommunity,omitempty"`
}
@@ -31820,7 +31820,7 @@ type VirtualRouter struct {
autorest.Response `json:"-"`
// VirtualRouterPropertiesFormat - Properties of the Virtual Router.
*VirtualRouterPropertiesFormat `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
+ // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
@@ -32076,14 +32076,14 @@ func NewVirtualRouterListResultPage(getNextPage func(context.Context, VirtualRou
return VirtualRouterListResultPage{fn: getNextPage}
}
-// VirtualRouterPeering virtual Router Peering resource
+// VirtualRouterPeering virtual Router Peering resource.
type VirtualRouterPeering struct {
autorest.Response `json:"-"`
// VirtualRouterPeeringProperties - The properties of the Virtual Router Peering.
*VirtualRouterPeeringProperties `json:"properties,omitempty"`
- // Name - Gets name of the peering unique to VirtualRouter. This name can be used to access the resource.
+ // Name - Name of the virtual router peering that is unique within a virtual router.
Name *string `json:"name,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
+ // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
// Type - READ-ONLY; Peering type.
Type *string `json:"type,omitempty"`
@@ -32375,17 +32375,17 @@ func (future *VirtualRouterPeeringsDeleteFuture) Result(client VirtualRouterPeer
return
}
-// VirtualRouterPropertiesFormat virtual Router definition
+// VirtualRouterPropertiesFormat virtual Router definition.
type VirtualRouterPropertiesFormat struct {
// VirtualRouterAsn - VirtualRouter ASN.
VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
- // VirtualRouterIps - VirtualRouter IPs
+ // VirtualRouterIps - VirtualRouter IPs.
VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
// HostedSubnet - The Subnet on which VirtualRouter is hosted.
HostedSubnet *SubResource `json:"hostedSubnet,omitempty"`
// HostedGateway - The Gateway on which VirtualRouter is hosted.
HostedGateway *SubResource `json:"hostedGateway,omitempty"`
- // Peerings - READ-ONLY; List of references to VirtualRouterPeerings
+ // Peerings - READ-ONLY; List of references to VirtualRouterPeerings.
Peerings *[]SubResource `json:"peerings,omitempty"`
// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
@@ -33377,7 +33377,7 @@ type VpnServerConfiguration struct {
autorest.Response `json:"-"`
// VpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
*VpnServerConfigurationProperties `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
+ // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
@@ -34851,7 +34851,7 @@ type WebApplicationFirewallPolicyPropertiesFormat struct {
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
- // ManagedRules - Describes the managedRules structure
+ // ManagedRules - Describes the managedRules structure.
ManagedRules *ManagedRulesDefinition `json:"managedRules,omitempty"`
// HTTPListeners - READ-ONLY; A collection of references to application gateway http listeners.
HTTPListeners *[]SubResource `json:"httpListeners,omitempty"`
diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/apps.go b/services/preview/cognitiveservices/v3.0/luis/authoring/apps.go
index 13de58e56cf0..c6dcaebc2fe3 100644
--- a/services/preview/cognitiveservices/v3.0/luis/authoring/apps.go
+++ b/services/preview/cognitiveservices/v3.0/luis/authoring/apps.go
@@ -90,7 +90,7 @@ func (client AppsClient) AddPreparer(ctx context.Context, applicationCreateObjec
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPath("/apps/"),
autorest.WithJSON(applicationCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -160,7 +160,7 @@ func (client AppsClient) AddCustomPrebuiltDomainPreparer(ctx context.Context, pr
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPath("/apps/customprebuiltdomains"),
autorest.WithJSON(prebuiltDomainCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -241,7 +241,7 @@ func (client AppsClient) DeletePreparer(ctx context.Context, appID uuid.UUID, fo
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -314,7 +314,7 @@ func (client AppsClient) DownloadQueryLogsPreparer(ctx context.Context, appID uu
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/querylogs", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -385,7 +385,7 @@ func (client AppsClient) GetPreparer(ctx context.Context, appID uuid.UUID) (*htt
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -457,7 +457,7 @@ func (client AppsClient) GetPublishSettingsPreparer(ctx context.Context, appID u
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/publishsettings", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -529,7 +529,7 @@ func (client AppsClient) GetSettingsPreparer(ctx context.Context, appID uuid.UUI
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/settings", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -605,7 +605,7 @@ func (client AppsClient) ImportPreparer(ctx context.Context, luisApp LuisApp, ap
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPath("/apps/import"),
autorest.WithJSON(luisApp),
autorest.WithQueryParameters(queryParameters))
@@ -700,7 +700,7 @@ func (client AppsClient) ListPreparer(ctx context.Context, skip *int32, take *in
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPath("/apps/"),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -767,7 +767,7 @@ func (client AppsClient) ListAvailableCustomPrebuiltDomainsPreparer(ctx context.
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPath("/apps/customprebuiltdomains"))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -839,7 +839,7 @@ func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulturePreparer(ct
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/customprebuiltdomains/{culture}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -905,7 +905,7 @@ func (client AppsClient) ListCortanaEndpointsPreparer(ctx context.Context) (*htt
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPath("/apps/assistants"))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -971,7 +971,7 @@ func (client AppsClient) ListDomainsPreparer(ctx context.Context) (*http.Request
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPath("/apps/domains"))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -1043,7 +1043,7 @@ func (client AppsClient) ListEndpointsPreparer(ctx context.Context, appID uuid.U
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/endpoints", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -1110,7 +1110,7 @@ func (client AppsClient) ListSupportedCulturesPreparer(ctx context.Context) (*ht
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPath("/apps/cultures"))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -1176,7 +1176,7 @@ func (client AppsClient) ListUsageScenariosPreparer(ctx context.Context) (*http.
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPath("/apps/usagescenarios"))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -1251,7 +1251,7 @@ func (client AppsClient) PackagePublishedApplicationAsGzipPreparer(ctx context.C
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/package/{appId}/slot/{slotName}/gzip", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -1324,7 +1324,7 @@ func (client AppsClient) PackageTrainedApplicationAsGzipPreparer(ctx context.Con
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/package/{appId}/versions/{versionId}/gzip", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -1398,7 +1398,7 @@ func (client AppsClient) PublishPreparer(ctx context.Context, appID uuid.UUID, a
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/publish", pathParameters),
autorest.WithJSON(applicationPublishObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1473,7 +1473,7 @@ func (client AppsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID, ap
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}", pathParameters),
autorest.WithJSON(applicationUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1548,7 +1548,7 @@ func (client AppsClient) UpdatePublishSettingsPreparer(ctx context.Context, appI
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/publishsettings", pathParameters),
autorest.WithJSON(publishSettingUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1623,7 +1623,7 @@ func (client AppsClient) UpdateSettingsPreparer(ctx context.Context, appID uuid.
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/settings", pathParameters),
autorest.WithJSON(applicationSettingUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/azureaccounts.go b/services/preview/cognitiveservices/v3.0/luis/authoring/azureaccounts.go
index 0839f2f501f3..563d37f5448c 100644
--- a/services/preview/cognitiveservices/v3.0/luis/authoring/azureaccounts.go
+++ b/services/preview/cognitiveservices/v3.0/luis/authoring/azureaccounts.go
@@ -96,7 +96,7 @@ func (client AzureAccountsClient) AssignToAppPreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/azureaccounts", pathParameters))
if azureAccountInfoObject != nil {
preparer = autorest.DecoratePreparer(preparer,
@@ -172,7 +172,7 @@ func (client AzureAccountsClient) GetAssignedPreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/azureaccounts", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -238,7 +238,7 @@ func (client AzureAccountsClient) ListUserLUISAccountsPreparer(ctx context.Conte
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPath("/azureaccounts"))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -322,7 +322,7 @@ func (client AzureAccountsClient) RemoveFromAppPreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/azureaccounts", pathParameters))
if azureAccountInfoObject != nil {
preparer = autorest.DecoratePreparer(preparer,
diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/examples.go b/services/preview/cognitiveservices/v3.0/luis/authoring/examples.go
index 8fe2b086e25c..df1b8d3b6dd4 100644
--- a/services/preview/cognitiveservices/v3.0/luis/authoring/examples.go
+++ b/services/preview/cognitiveservices/v3.0/luis/authoring/examples.go
@@ -88,7 +88,7 @@ func (client ExamplesClient) AddPreparer(ctx context.Context, appID uuid.UUID, v
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/example", pathParameters),
autorest.WithJSON(exampleLabelObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -171,7 +171,7 @@ func (client ExamplesClient) BatchPreparer(ctx context.Context, appID uuid.UUID,
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/examples", pathParameters),
autorest.WithJSON(exampleLabelObjectArray))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -248,7 +248,7 @@ func (client ExamplesClient) DeletePreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/examples/{exampleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -348,7 +348,7 @@ func (client ExamplesClient) ListPreparer(ctx context.Context, appID uuid.UUID,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/examples", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/features.go b/services/preview/cognitiveservices/v3.0/luis/authoring/features.go
index 58c6067d6245..2c33b1fc74e5 100644
--- a/services/preview/cognitiveservices/v3.0/luis/authoring/features.go
+++ b/services/preview/cognitiveservices/v3.0/luis/authoring/features.go
@@ -90,7 +90,7 @@ func (client FeaturesClient) AddEntityFeaturePreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/features", pathParameters),
autorest.WithJSON(featureRelationCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -169,7 +169,7 @@ func (client FeaturesClient) AddIntentFeaturePreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/features", pathParameters),
autorest.WithJSON(featureRelationCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -247,7 +247,7 @@ func (client FeaturesClient) AddPhraseListPreparer(ctx context.Context, appID uu
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists", pathParameters),
autorest.WithJSON(phraselistCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -324,7 +324,7 @@ func (client FeaturesClient) DeletePhraseListPreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -400,7 +400,7 @@ func (client FeaturesClient) GetPhraseListPreparer(ctx context.Context, appID uu
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -500,7 +500,7 @@ func (client FeaturesClient) ListPreparer(ctx context.Context, appID uuid.UUID,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/features", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -601,7 +601,7 @@ func (client FeaturesClient) ListPhraseListsPreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -682,7 +682,7 @@ func (client FeaturesClient) UpdatePhraseListPreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", pathParameters))
if phraselistUpdateObject != nil {
preparer = autorest.DecoratePreparer(preparer,
diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/model.go b/services/preview/cognitiveservices/v3.0/luis/authoring/model.go
index eebc34e1e621..d9ac8358196b 100644
--- a/services/preview/cognitiveservices/v3.0/luis/authoring/model.go
+++ b/services/preview/cognitiveservices/v3.0/luis/authoring/model.go
@@ -88,7 +88,7 @@ func (client ModelClient) AddClosedListPreparer(ctx context.Context, appID uuid.
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists", pathParameters),
autorest.WithJSON(closedListModelCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -168,7 +168,7 @@ func (client ModelClient) AddCompositeEntityChildPreparer(ctx context.Context, a
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children", pathParameters),
autorest.WithJSON(compositeChildModelCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -246,7 +246,7 @@ func (client ModelClient) AddCustomPrebuiltDomainPreparer(ctx context.Context, a
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltdomains", pathParameters),
autorest.WithJSON(prebuiltDomainObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -324,7 +324,7 @@ func (client ModelClient) AddCustomPrebuiltEntityPreparer(ctx context.Context, a
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities", pathParameters),
autorest.WithJSON(prebuiltDomainModelCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -402,7 +402,7 @@ func (client ModelClient) AddCustomPrebuiltIntentPreparer(ctx context.Context, a
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltintents", pathParameters),
autorest.WithJSON(prebuiltDomainModelCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -479,7 +479,7 @@ func (client ModelClient) AddEntityPreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities", pathParameters),
autorest.WithJSON(entityModelCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -558,7 +558,7 @@ func (client ModelClient) AddEntityChildPreparer(ctx context.Context, appID uuid
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/children", pathParameters),
autorest.WithJSON(childEntityModelCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -637,7 +637,7 @@ func (client ModelClient) AddExplicitListItemPreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters),
autorest.WithJSON(item))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -714,7 +714,7 @@ func (client ModelClient) AddIntentPreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents", pathParameters),
autorest.WithJSON(intentCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -797,7 +797,7 @@ func (client ModelClient) AddPrebuiltPreparer(ctx context.Context, appID uuid.UU
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts", pathParameters),
autorest.WithJSON(prebuiltExtractorNames))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -876,7 +876,7 @@ func (client ModelClient) AddSubListPreparer(ctx context.Context, appID uuid.UUI
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists", pathParameters),
autorest.WithJSON(wordListCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -955,7 +955,7 @@ func (client ModelClient) CreateClosedListEntityRolePreparer(ctx context.Context
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters),
autorest.WithJSON(entityRoleCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1034,7 +1034,7 @@ func (client ModelClient) CreateCompositeEntityRolePreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters),
autorest.WithJSON(entityRoleCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1113,7 +1113,7 @@ func (client ModelClient) CreateCustomPrebuiltEntityRolePreparer(ctx context.Con
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters),
autorest.WithJSON(entityRoleCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1192,7 +1192,7 @@ func (client ModelClient) CreateEntityRolePreparer(ctx context.Context, appID uu
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters),
autorest.WithJSON(entityRoleCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1271,7 +1271,7 @@ func (client ModelClient) CreateHierarchicalEntityRolePreparer(ctx context.Conte
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters),
autorest.WithJSON(entityRoleCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1349,7 +1349,7 @@ func (client ModelClient) CreatePatternAnyEntityModelPreparer(ctx context.Contex
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters),
autorest.WithJSON(extractorCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1428,7 +1428,7 @@ func (client ModelClient) CreatePatternAnyEntityRolePreparer(ctx context.Context
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters),
autorest.WithJSON(entityRoleCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1507,7 +1507,7 @@ func (client ModelClient) CreatePrebuiltEntityRolePreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters),
autorest.WithJSON(entityRoleCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1585,7 +1585,7 @@ func (client ModelClient) CreateRegexEntityModelPreparer(ctx context.Context, ap
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters),
autorest.WithJSON(regexEntityExtractorCreateObj))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1664,7 +1664,7 @@ func (client ModelClient) CreateRegexEntityRolePreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters),
autorest.WithJSON(entityRoleCreateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -1741,7 +1741,7 @@ func (client ModelClient) DeleteClosedListPreparer(ctx context.Context, appID uu
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -1819,7 +1819,7 @@ func (client ModelClient) DeleteClosedListEntityRolePreparer(ctx context.Context
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -1895,7 +1895,7 @@ func (client ModelClient) DeleteCompositeEntityPreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -1973,7 +1973,7 @@ func (client ModelClient) DeleteCompositeEntityChildPreparer(ctx context.Context
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children/{cChildId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -2051,7 +2051,7 @@ func (client ModelClient) DeleteCompositeEntityRolePreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -2129,7 +2129,7 @@ func (client ModelClient) DeleteCustomEntityRolePreparer(ctx context.Context, ap
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -2205,7 +2205,7 @@ func (client ModelClient) DeleteCustomPrebuiltDomainPreparer(ctx context.Context
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltdomains/{domainName}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -2281,7 +2281,7 @@ func (client ModelClient) DeleteEntityPreparer(ctx context.Context, appID uuid.U
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -2360,7 +2360,7 @@ func (client ModelClient) DeleteEntityFeaturePreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/features", pathParameters),
autorest.WithJSON(featureRelationDeleteObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -2439,7 +2439,7 @@ func (client ModelClient) DeleteEntityRolePreparer(ctx context.Context, appID uu
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -2517,7 +2517,7 @@ func (client ModelClient) DeleteExplicitListItemPreparer(ctx context.Context, ap
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -2593,7 +2593,7 @@ func (client ModelClient) DeleteHierarchicalEntityPreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -2671,7 +2671,7 @@ func (client ModelClient) DeleteHierarchicalEntityChildPreparer(ctx context.Cont
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -2749,7 +2749,7 @@ func (client ModelClient) DeleteHierarchicalEntityRolePreparer(ctx context.Conte
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -2834,7 +2834,7 @@ func (client ModelClient) DeleteIntentPreparer(ctx context.Context, appID uuid.U
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -2914,7 +2914,7 @@ func (client ModelClient) DeleteIntentFeaturePreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/features", pathParameters),
autorest.WithJSON(featureRelationDeleteObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -2991,7 +2991,7 @@ func (client ModelClient) DeletePatternAnyEntityModelPreparer(ctx context.Contex
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -3069,7 +3069,7 @@ func (client ModelClient) DeletePatternAnyEntityRolePreparer(ctx context.Context
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -3145,7 +3145,7 @@ func (client ModelClient) DeletePrebuiltPreparer(ctx context.Context, appID uuid
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -3223,7 +3223,7 @@ func (client ModelClient) DeletePrebuiltEntityRolePreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -3299,7 +3299,7 @@ func (client ModelClient) DeleteRegexEntityModelPreparer(ctx context.Context, ap
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -3377,7 +3377,7 @@ func (client ModelClient) DeleteRegexEntityRolePreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -3455,7 +3455,7 @@ func (client ModelClient) DeleteSubListPreparer(ctx context.Context, appID uuid.
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -3557,7 +3557,7 @@ func (client ModelClient) ExamplesMethodPreparer(ctx context.Context, appID uuid
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/models/{modelId}/examples", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -3634,7 +3634,7 @@ func (client ModelClient) GetClosedListPreparer(ctx context.Context, appID uuid.
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -3712,7 +3712,7 @@ func (client ModelClient) GetClosedListEntityRolePreparer(ctx context.Context, a
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -3788,7 +3788,7 @@ func (client ModelClient) GetCompositeEntityPreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -3866,7 +3866,7 @@ func (client ModelClient) GetCompositeEntityRolePreparer(ctx context.Context, ap
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -3944,7 +3944,7 @@ func (client ModelClient) GetCustomEntityRolePreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4020,7 +4020,7 @@ func (client ModelClient) GetEntityPreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4096,7 +4096,7 @@ func (client ModelClient) GetEntityFeaturesPreparer(ctx context.Context, appID u
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/features", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4174,7 +4174,7 @@ func (client ModelClient) GetEntityRolePreparer(ctx context.Context, appID uuid.
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4250,7 +4250,7 @@ func (client ModelClient) GetExplicitListPreparer(ctx context.Context, appID uui
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4328,7 +4328,7 @@ func (client ModelClient) GetExplicitListItemPreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4404,7 +4404,7 @@ func (client ModelClient) GetHierarchicalEntityPreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4483,7 +4483,7 @@ func (client ModelClient) GetHierarchicalEntityChildPreparer(ctx context.Context
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4561,7 +4561,7 @@ func (client ModelClient) GetHierarchicalEntityRolePreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4637,7 +4637,7 @@ func (client ModelClient) GetIntentPreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4713,7 +4713,7 @@ func (client ModelClient) GetIntentFeaturesPreparer(ctx context.Context, appID u
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/features", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4789,7 +4789,7 @@ func (client ModelClient) GetPatternAnyEntityInfoPreparer(ctx context.Context, a
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4867,7 +4867,7 @@ func (client ModelClient) GetPatternAnyEntityRolePreparer(ctx context.Context, a
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -4943,7 +4943,7 @@ func (client ModelClient) GetPrebuiltPreparer(ctx context.Context, appID uuid.UU
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -5021,7 +5021,7 @@ func (client ModelClient) GetPrebuiltEntityRolePreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -5097,7 +5097,7 @@ func (client ModelClient) GetRegexEntityEntityInfoPreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -5175,7 +5175,7 @@ func (client ModelClient) GetRegexEntityRolePreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -5251,7 +5251,7 @@ func (client ModelClient) ListClosedListEntityRolesPreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -5351,7 +5351,7 @@ func (client ModelClient) ListClosedListsPreparer(ctx context.Context, appID uui
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -5452,7 +5452,7 @@ func (client ModelClient) ListCompositeEntitiesPreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -5529,7 +5529,7 @@ func (client ModelClient) ListCompositeEntityRolesPreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -5603,7 +5603,7 @@ func (client ModelClient) ListCustomPrebuiltEntitiesPreparer(ctx context.Context
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -5679,7 +5679,7 @@ func (client ModelClient) ListCustomPrebuiltEntityRolesPreparer(ctx context.Cont
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -5754,7 +5754,7 @@ func (client ModelClient) ListCustomPrebuiltIntentsPreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltintents", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -5829,7 +5829,7 @@ func (client ModelClient) ListCustomPrebuiltModelsPreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltmodels", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -5929,7 +5929,7 @@ func (client ModelClient) ListEntitiesPreparer(ctx context.Context, appID uuid.U
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -6006,7 +6006,7 @@ func (client ModelClient) ListEntityRolesPreparer(ctx context.Context, appID uui
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -6100,7 +6100,7 @@ func (client ModelClient) ListEntitySuggestionsPreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/suggest", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -6201,7 +6201,7 @@ func (client ModelClient) ListHierarchicalEntitiesPreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -6278,7 +6278,7 @@ func (client ModelClient) ListHierarchicalEntityRolesPreparer(ctx context.Contex
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -6378,7 +6378,7 @@ func (client ModelClient) ListIntentsPreparer(ctx context.Context, appID uuid.UU
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -6473,7 +6473,7 @@ func (client ModelClient) ListIntentSuggestionsPreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/suggest", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -6574,7 +6574,7 @@ func (client ModelClient) ListModelsPreparer(ctx context.Context, appID uuid.UUI
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/models", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -6675,7 +6675,7 @@ func (client ModelClient) ListPatternAnyEntityInfosPreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -6752,7 +6752,7 @@ func (client ModelClient) ListPatternAnyEntityRolesPreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -6826,7 +6826,7 @@ func (client ModelClient) ListPrebuiltEntitiesPreparer(ctx context.Context, appI
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/listprebuilts", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -6902,7 +6902,7 @@ func (client ModelClient) ListPrebuiltEntityRolesPreparer(ctx context.Context, a
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -7002,7 +7002,7 @@ func (client ModelClient) ListPrebuiltsPreparer(ctx context.Context, appID uuid.
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -7103,7 +7103,7 @@ func (client ModelClient) ListRegexEntityInfosPreparer(ctx context.Context, appI
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -7180,7 +7180,7 @@ func (client ModelClient) ListRegexEntityRolesPreparer(ctx context.Context, appI
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -7258,7 +7258,7 @@ func (client ModelClient) PatchClosedListPreparer(ctx context.Context, appID uui
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters),
autorest.WithJSON(closedListModelPatchObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -7343,7 +7343,7 @@ func (client ModelClient) ReplaceEntityFeaturesPreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/features", pathParameters),
autorest.WithJSON(featureRelationsUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -7428,7 +7428,7 @@ func (client ModelClient) ReplaceIntentFeaturesPreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/features", pathParameters),
autorest.WithJSON(featureRelationsUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -7507,7 +7507,7 @@ func (client ModelClient) UpdateClosedListPreparer(ctx context.Context, appID uu
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters),
autorest.WithJSON(closedListModelUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -7588,7 +7588,7 @@ func (client ModelClient) UpdateClosedListEntityRolePreparer(ctx context.Context
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters),
autorest.WithJSON(entityRoleUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -7667,7 +7667,7 @@ func (client ModelClient) UpdateCompositeEntityPreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters),
autorest.WithJSON(compositeModelUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -7748,7 +7748,7 @@ func (client ModelClient) UpdateCompositeEntityRolePreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters),
autorest.WithJSON(entityRoleUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -7829,7 +7829,7 @@ func (client ModelClient) UpdateCustomPrebuiltEntityRolePreparer(ctx context.Con
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters),
autorest.WithJSON(entityRoleUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -7910,7 +7910,7 @@ func (client ModelClient) UpdateEntityChildPreparer(ctx context.Context, appID u
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters),
autorest.WithJSON(entityModelUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -7991,7 +7991,7 @@ func (client ModelClient) UpdateEntityRolePreparer(ctx context.Context, appID uu
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters),
autorest.WithJSON(entityRoleUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -8072,7 +8072,7 @@ func (client ModelClient) UpdateExplicitListItemPreparer(ctx context.Context, ap
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters),
autorest.WithJSON(item))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -8151,7 +8151,7 @@ func (client ModelClient) UpdateHierarchicalEntityPreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters),
autorest.WithJSON(modelUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -8233,7 +8233,7 @@ func (client ModelClient) UpdateHierarchicalEntityChildPreparer(ctx context.Cont
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters),
autorest.WithJSON(hierarchicalChildModelUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -8314,7 +8314,7 @@ func (client ModelClient) UpdateHierarchicalEntityRolePreparer(ctx context.Conte
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters),
autorest.WithJSON(entityRoleUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -8393,7 +8393,7 @@ func (client ModelClient) UpdateIntentPreparer(ctx context.Context, appID uuid.U
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters),
autorest.WithJSON(modelUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -8472,7 +8472,7 @@ func (client ModelClient) UpdatePatternAnyEntityModelPreparer(ctx context.Contex
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters),
autorest.WithJSON(patternAnyUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -8553,7 +8553,7 @@ func (client ModelClient) UpdatePatternAnyEntityRolePreparer(ctx context.Context
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters),
autorest.WithJSON(entityRoleUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -8634,7 +8634,7 @@ func (client ModelClient) UpdatePrebuiltEntityRolePreparer(ctx context.Context,
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters),
autorest.WithJSON(entityRoleUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -8713,7 +8713,7 @@ func (client ModelClient) UpdateRegexEntityModelPreparer(ctx context.Context, ap
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters),
autorest.WithJSON(regexEntityUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -8794,7 +8794,7 @@ func (client ModelClient) UpdateRegexEntityRolePreparer(ctx context.Context, app
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters),
autorest.WithJSON(entityRoleUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -8875,7 +8875,7 @@ func (client ModelClient) UpdateSubListPreparer(ctx context.Context, appID uuid.
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", pathParameters),
autorest.WithJSON(wordListBaseUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/models.go b/services/preview/cognitiveservices/v3.0/luis/authoring/models.go
index 64d7ab0da5b2..2c184abc02cc 100644
--- a/services/preview/cognitiveservices/v3.0/luis/authoring/models.go
+++ b/services/preview/cognitiveservices/v3.0/luis/authoring/models.go
@@ -1033,10 +1033,11 @@ type HierarchicalEntityExtractor struct {
// HierarchicalModel ...
type HierarchicalModel struct {
- Name *string `json:"name,omitempty"`
- Children *[]string `json:"children,omitempty"`
- Inherits *PrebuiltDomainObject `json:"inherits,omitempty"`
- Roles *[]string `json:"roles,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Children *[]JSONChild `json:"children,omitempty"`
+ Features *[]JSONModelFeatureInformation `json:"features,omitempty"`
+ Roles *[]string `json:"roles,omitempty"`
+ Inherits *PrebuiltDomainObject `json:"inherits,omitempty"`
}
// Int32 ...
@@ -1088,6 +1089,14 @@ type IntentsSuggestionExample struct {
EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
}
+// JSONChild ...
+type JSONChild struct {
+ Name *string `json:"name,omitempty"`
+ InstanceOf *string `json:"instanceOf,omitempty"`
+ Children *[]JSONChild `json:"children,omitempty"`
+ Features *[]JSONModelFeatureInformation `json:"features,omitempty"`
+}
+
// JSONEntity exported Model - Extracted Entity from utterance.
type JSONEntity struct {
// StartPos - The index within the utterance where the extracted entity starts.
@@ -1110,6 +1119,17 @@ type JSONModelFeature struct {
Words *string `json:"words,omitempty"`
// Mode - An interchangeable phrase list feature serves as a list of synonyms for training. A non-exchangeable phrase list serves as separate features for training. So, if your non-interchangeable phrase list contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-interchangeable phrase list as an additional bag of words to add to LUIS existing vocabulary features. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Default value is true.
Mode *bool `json:"mode,omitempty"`
+ // EnabledForAllModels - Indicates if the Phraselist is enabled for all models in the application.
+ EnabledForAllModels *bool `json:"enabledForAllModels,omitempty"`
+}
+
+// JSONModelFeatureInformation an object containing the model feature information either the model name or
+// feature name.
+type JSONModelFeatureInformation struct {
+ // ModelName - The name of the model used.
+ ModelName *string `json:"modelName,omitempty"`
+ // FeatureName - The name of the feature used.
+ FeatureName *string `json:"featureName,omitempty"`
}
// JSONRegexFeature exported Model - A Pattern feature.
@@ -1374,6 +1394,8 @@ type LuisApp struct {
ClosedLists *[]ClosedList `json:"closedLists,omitempty"`
// Composites - List of composite entities.
Composites *[]HierarchicalModel `json:"composites,omitempty"`
+ // Hierarchicals - List of hierarchical entities.
+ Hierarchicals *[]HierarchicalModel `json:"hierarchicals,omitempty"`
// PatternAnyEntities - List of Pattern.Any entities.
PatternAnyEntities *[]PatternAny `json:"patternAnyEntities,omitempty"`
// RegexEntities - List of regular expression entities.
@@ -1382,8 +1404,8 @@ type LuisApp struct {
PrebuiltEntities *[]PrebuiltEntity `json:"prebuiltEntities,omitempty"`
// RegexFeatures - List of pattern features.
RegexFeatures *[]JSONRegexFeature `json:"regex_features,omitempty"`
- // ModelFeatures - List of model features.
- ModelFeatures *[]JSONModelFeature `json:"model_features,omitempty"`
+ // Phraselists - List of model features.
+ Phraselists *[]JSONModelFeature `json:"phraselists,omitempty"`
// Patterns - List of patterns.
Patterns *[]PatternRule `json:"patterns,omitempty"`
// Utterances - List of example utterances.
@@ -1417,6 +1439,9 @@ func (la LuisApp) MarshalJSON() ([]byte, error) {
if la.Composites != nil {
objectMap["composites"] = la.Composites
}
+ if la.Hierarchicals != nil {
+ objectMap["hierarchicals"] = la.Hierarchicals
+ }
if la.PatternAnyEntities != nil {
objectMap["patternAnyEntities"] = la.PatternAnyEntities
}
@@ -1429,8 +1454,8 @@ func (la LuisApp) MarshalJSON() ([]byte, error) {
if la.RegexFeatures != nil {
objectMap["regex_features"] = la.RegexFeatures
}
- if la.ModelFeatures != nil {
- objectMap["model_features"] = la.ModelFeatures
+ if la.Phraselists != nil {
+ objectMap["phraselists"] = la.Phraselists
}
if la.Patterns != nil {
objectMap["patterns"] = la.Patterns
@@ -1537,6 +1562,15 @@ func (la *LuisApp) UnmarshalJSON(body []byte) error {
}
la.Composites = &composites
}
+ case "hierarchicals":
+ if v != nil {
+ var hierarchicals []HierarchicalModel
+ err = json.Unmarshal(*v, &hierarchicals)
+ if err != nil {
+ return err
+ }
+ la.Hierarchicals = &hierarchicals
+ }
case "patternAnyEntities":
if v != nil {
var patternAnyEntities []PatternAny
@@ -1573,14 +1607,14 @@ func (la *LuisApp) UnmarshalJSON(body []byte) error {
}
la.RegexFeatures = ®exFeatures
}
- case "model_features":
+ case "phraselists":
if v != nil {
- var modelFeatures []JSONModelFeature
- err = json.Unmarshal(*v, &modelFeatures)
+ var phraselists []JSONModelFeature
+ err = json.Unmarshal(*v, &phraselists)
if err != nil {
return err
}
- la.ModelFeatures = &modelFeatures
+ la.Phraselists = &phraselists
}
case "patterns":
if v != nil {
@@ -1835,6 +1869,8 @@ type PhraselistCreateObject struct {
Name *string `json:"name,omitempty"`
// IsExchangeable - An interchangeable phrase list feature serves as a list of synonyms for training. A non-exchangeable phrase list serves as separate features for training. So, if your non-interchangeable phrase list contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-interchangeable phrase list as an additional bag of words to add to LUIS existing vocabulary features. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Default value is true.
IsExchangeable *bool `json:"isExchangeable,omitempty"`
+ // EnabledForAllModels - Indicates if the Phraselist is enabled for all models in the application.
+ EnabledForAllModels *bool `json:"enabledForAllModels,omitempty"`
}
// PhraseListFeatureInfo phraselist Feature.
diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/pattern.go b/services/preview/cognitiveservices/v3.0/luis/authoring/pattern.go
index d827805145dc..bf4dd03ad6db 100644
--- a/services/preview/cognitiveservices/v3.0/luis/authoring/pattern.go
+++ b/services/preview/cognitiveservices/v3.0/luis/authoring/pattern.go
@@ -88,7 +88,7 @@ func (client PatternClient) AddPatternPreparer(ctx context.Context, appID uuid.U
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrule", pathParameters),
autorest.WithJSON(pattern))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -171,7 +171,7 @@ func (client PatternClient) BatchAddPatternsPreparer(ctx context.Context, appID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
autorest.WithJSON(patterns))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -248,7 +248,7 @@ func (client PatternClient) DeletePatternPreparer(ctx context.Context, appID uui
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules/{patternId}", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -330,7 +330,7 @@ func (client PatternClient) DeletePatternsPreparer(ctx context.Context, appID uu
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
autorest.WithJSON(patternIds))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -433,7 +433,7 @@ func (client PatternClient) ListIntentPatternsPreparer(ctx context.Context, appI
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/patternrules", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -534,7 +534,7 @@ func (client PatternClient) ListPatternsPreparer(ctx context.Context, appID uuid
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -613,7 +613,7 @@ func (client PatternClient) UpdatePatternPreparer(ctx context.Context, appID uui
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules/{patternId}", pathParameters),
autorest.WithJSON(pattern))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -696,7 +696,7 @@ func (client PatternClient) UpdatePatternsPreparer(ctx context.Context, appID uu
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
autorest.WithJSON(patterns))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/permissions.go b/services/preview/cognitiveservices/v3.0/luis/authoring/permissions.go
index f502cfb640e0..a55c0c538b0e 100644
--- a/services/preview/cognitiveservices/v3.0/luis/authoring/permissions.go
+++ b/services/preview/cognitiveservices/v3.0/luis/authoring/permissions.go
@@ -86,7 +86,7 @@ func (client PermissionsClient) AddPreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters),
autorest.WithJSON(userToAdd))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -162,7 +162,7 @@ func (client PermissionsClient) DeletePreparer(ctx context.Context, appID uuid.U
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters),
autorest.WithJSON(userToDelete))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -235,7 +235,7 @@ func (client PermissionsClient) ListPreparer(ctx context.Context, appID uuid.UUI
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -310,7 +310,7 @@ func (client PermissionsClient) UpdatePreparer(ctx context.Context, appID uuid.U
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters),
autorest.WithJSON(collaborators))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/settings.go b/services/preview/cognitiveservices/v3.0/luis/authoring/settings.go
index f5a254b06f0b..e0f0139c72ae 100644
--- a/services/preview/cognitiveservices/v3.0/luis/authoring/settings.go
+++ b/services/preview/cognitiveservices/v3.0/luis/authoring/settings.go
@@ -86,7 +86,7 @@ func (client SettingsClient) ListPreparer(ctx context.Context, appID uuid.UUID,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/settings", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -168,7 +168,7 @@ func (client SettingsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/settings", pathParameters),
autorest.WithJSON(listOfAppVersionSettingObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/train.go b/services/preview/cognitiveservices/v3.0/luis/authoring/train.go
index aaba41df3efc..b2058fae50c9 100644
--- a/services/preview/cognitiveservices/v3.0/luis/authoring/train.go
+++ b/services/preview/cognitiveservices/v3.0/luis/authoring/train.go
@@ -87,7 +87,7 @@ func (client TrainClient) GetStatusPreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/train", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -165,7 +165,7 @@ func (client TrainClient) TrainVersionPreparer(ctx context.Context, appID uuid.U
preparer := autorest.CreatePreparer(
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/train", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/versions.go b/services/preview/cognitiveservices/v3.0/luis/authoring/versions.go
index bfb400e04767..51df6b99edf3 100644
--- a/services/preview/cognitiveservices/v3.0/luis/authoring/versions.go
+++ b/services/preview/cognitiveservices/v3.0/luis/authoring/versions.go
@@ -88,7 +88,7 @@ func (client VersionsClient) ClonePreparer(ctx context.Context, appID uuid.UUID,
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/clone", pathParameters),
autorest.WithJSON(versionCloneObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -163,7 +163,7 @@ func (client VersionsClient) DeletePreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -239,7 +239,7 @@ func (client VersionsClient) DeleteUnlabelledUtterancePreparer(ctx context.Conte
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsDelete(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/suggest", pathParameters),
autorest.WithJSON(utterance))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -314,7 +314,7 @@ func (client VersionsClient) ExportPreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/export", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -389,7 +389,7 @@ func (client VersionsClient) GetPreparer(ctx context.Context, appID uuid.UUID, v
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/", pathParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -470,7 +470,7 @@ func (client VersionsClient) ImportPreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/import", pathParameters),
autorest.WithJSON(luisApp),
autorest.WithQueryParameters(queryParameters))
@@ -570,7 +570,7 @@ func (client VersionsClient) ListPreparer(ctx context.Context, appID uuid.UUID,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -647,7 +647,7 @@ func (client VersionsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
- autorest.WithCustomBaseURL("{Endpoint}/luis/api/v3.0-preview", urlParameters),
+ autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/", pathParameters),
autorest.WithJSON(versionUpdateObject))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/cassandraresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/cassandraresources.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/cassandraresources.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/cassandraresources.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/client.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/client.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/client.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/client.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/collection.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collection.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/collection.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collection.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartition.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartition.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartition.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartition.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartitionregion.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartitionregion.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartitionregion.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartitionregion.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionregion.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionregion.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionregion.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionregion.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/database.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/database.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/database.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/database.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccountregion.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccountregion.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccountregion.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccountregion.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/documentdbapi/interfaces.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/documentdbapi/interfaces.go
similarity index 99%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/documentdbapi/interfaces.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/documentdbapi/interfaces.go
index 8fa50a0a843b..b51f2fa91d3c 100644
--- a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/documentdbapi/interfaces.go
+++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/documentdbapi/interfaces.go
@@ -19,7 +19,7 @@ package documentdbapi
import (
"context"
- "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-08-01-preview/documentdb"
+ "github.com/Azure/azure-sdk-for-go/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb"
"github.com/Azure/go-autorest/autorest"
)
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/models.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/models.go
similarity index 99%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/models.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/models.go
index 39ca07464269..8616d54012c8 100644
--- a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/models.go
+++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/models.go
@@ -29,7 +29,7 @@ import (
)
// The package's fully qualified name.
-const fqdn = "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-08-01-preview/documentdb"
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb"
// ConflictResolutionMode enumerates the values for conflict resolution mode.
type ConflictResolutionMode string
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/mongodbresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/mongodbresources.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/mongodbresources.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/mongodbresources.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/operations.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/operations.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/operations.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/operations.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeid.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeid.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeid.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeid.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeidregion.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeidregion.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeidregion.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeidregion.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentile.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentile.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentile.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentile.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentilesourcetarget.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentilesourcetarget.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentilesourcetarget.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentilesourcetarget.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentiletarget.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentiletarget.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentiletarget.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentiletarget.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/privateendpointconnections.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privateendpointconnections.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/privateendpointconnections.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privateendpointconnections.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/privatelinkresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privatelinkresources.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/privatelinkresources.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privatelinkresources.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/tableresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/tableresources.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/tableresources.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/tableresources.go
diff --git a/services/cosmos-db/mgmt/2019-08-01-preview/documentdb/version.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/version.go
similarity index 100%
rename from services/cosmos-db/mgmt/2019-08-01-preview/documentdb/version.go
rename to services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/version.go
diff --git a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go
index de3e9d7519b2..edb7e01634df 100644
--- a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go
+++ b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go
@@ -72,6 +72,8 @@ func PossibleHanaInstancePowerStateEnumValues() []HanaInstancePowerStateEnum {
type HanaInstanceSizeNamesEnum string
const (
+ // S112 ...
+ S112 HanaInstanceSizeNamesEnum = "S112"
// S144 ...
S144 HanaInstanceSizeNamesEnum = "S144"
// S144m ...
@@ -88,6 +90,12 @@ const (
S224o HanaInstanceSizeNamesEnum = "S224o"
// S224om ...
S224om HanaInstanceSizeNamesEnum = "S224om"
+ // S224oo ...
+ S224oo HanaInstanceSizeNamesEnum = "S224oo"
+ // S224oom ...
+ S224oom HanaInstanceSizeNamesEnum = "S224oom"
+ // S224ooo ...
+ S224ooo HanaInstanceSizeNamesEnum = "S224ooo"
// S224oxm ...
S224oxm HanaInstanceSizeNamesEnum = "S224oxm"
// S224oxxm ...
@@ -122,7 +130,7 @@ const (
// PossibleHanaInstanceSizeNamesEnumValues returns an array of possible values for the HanaInstanceSizeNamesEnum const type.
func PossibleHanaInstanceSizeNamesEnumValues() []HanaInstanceSizeNamesEnum {
- return []HanaInstanceSizeNamesEnum{S144, S144m, S192, S192m, S192xm, S224m, S224o, S224om, S224oxm, S224oxxm, S384, S384m, S384xm, S384xxm, S576m, S576xm, S72, S72m, S768, S768m, S768xm, S96, S960m}
+ return []HanaInstanceSizeNamesEnum{S112, S144, S144m, S192, S192m, S192xm, S224m, S224o, S224om, S224oo, S224oom, S224ooo, S224oxm, S224oxxm, S384, S384m, S384xm, S384xxm, S576m, S576xm, S72, S72m, S768, S768m, S768xm, S96, S960m}
}
// HanaProvisioningStatesEnum enumerates the values for hana provisioning states enum.
@@ -575,7 +583,7 @@ func (future *HanaInstancesStartFuture) Result(client HanaInstancesClient) (ar a
type HardwareProfile struct {
// HardwareType - READ-ONLY; Name of the hardware type (vendor and/or their product name). Possible values include: 'CiscoUCS', 'HPE'
HardwareType HanaHardwareTypeNamesEnum `json:"hardwareType,omitempty"`
- // HanaInstanceSize - READ-ONLY; Specifies the HANA instance SKU. Possible values include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m', 'S192xm', 'S96', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m', 'S224o', 'S224m', 'S224om', 'S224oxm', 'S224oxxm'
+ // HanaInstanceSize - READ-ONLY; Specifies the HANA instance SKU. Possible values include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m', 'S192xm', 'S96', 'S112', 'S224m', 'S224o', 'S224om', 'S224oo', 'S224oom', 'S224ooo', 'S224oxm', 'S224oxxm', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m'
HanaInstanceSize HanaInstanceSizeNamesEnum `json:"hanaInstanceSize,omitempty"`
}
diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/client.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/client.go
new file mode 100644
index 000000000000..5be449ad0697
--- /dev/null
+++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/client.go
@@ -0,0 +1,262 @@
+// Package managementgroups implements the Azure ARM Managementgroups service API version 2019-11-01.
+//
+// The Azure Management Groups API enables consolidation of multiple subscriptions/resources into an organizational
+// hierarchy and centrally manage access control, policies, alerting and reporting for those resources.
+package managementgroups
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Managementgroups
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Managementgroups.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+}
+
+// New creates an instance of the BaseClient client.
+func New() BaseClient {
+ return NewWithBaseURI(DefaultBaseURI)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ }
+}
+
+// CheckNameAvailability checks if the specified management group name is valid and unique
+// Parameters:
+// checkNameAvailabilityRequest - management group name availability check parameters.
+func (client BaseClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityRequest CheckNameAvailabilityRequest) (result CheckNameAvailabilityResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckNameAvailability")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CheckNameAvailabilityPreparer(ctx, checkNameAvailabilityRequest)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "CheckNameAvailability", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckNameAvailabilitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "CheckNameAvailability", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckNameAvailabilityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "CheckNameAvailability", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request.
+func (client BaseClient) CheckNameAvailabilityPreparer(ctx context.Context, checkNameAvailabilityRequest CheckNameAvailabilityRequest) (*http.Request, error) {
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/checkNameAvailability"),
+ autorest.WithJSON(checkNameAvailabilityRequest),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always
+// closes the http.Response Body.
+func (client BaseClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// StartTenantBackfill starts backfilling subscriptions for the Tenant.
+func (client BaseClient) StartTenantBackfill(ctx context.Context) (result TenantBackfillStatusResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartTenantBackfill")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.StartTenantBackfillPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "StartTenantBackfill", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.StartTenantBackfillSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "StartTenantBackfill", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.StartTenantBackfillResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "StartTenantBackfill", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// StartTenantBackfillPreparer prepares the StartTenantBackfill request.
+func (client BaseClient) StartTenantBackfillPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/startTenantBackfill"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartTenantBackfillSender sends the StartTenantBackfill request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) StartTenantBackfillSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// StartTenantBackfillResponder handles the response to the StartTenantBackfill request. The method always
+// closes the http.Response Body.
+func (client BaseClient) StartTenantBackfillResponder(resp *http.Response) (result TenantBackfillStatusResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// TenantBackfillStatus gets tenant backfill status
+func (client BaseClient) TenantBackfillStatus(ctx context.Context) (result TenantBackfillStatusResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.TenantBackfillStatus")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.TenantBackfillStatusPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "TenantBackfillStatus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.TenantBackfillStatusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "TenantBackfillStatus", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.TenantBackfillStatusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "TenantBackfillStatus", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// TenantBackfillStatusPreparer prepares the TenantBackfillStatus request.
+func (client BaseClient) TenantBackfillStatusPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/tenantBackfillStatus"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// TenantBackfillStatusSender sends the TenantBackfillStatus request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) TenantBackfillStatusSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// TenantBackfillStatusResponder handles the response to the TenantBackfillStatus request. The method always
+// closes the http.Response Body.
+func (client BaseClient) TenantBackfillStatusResponder(resp *http.Response) (result TenantBackfillStatusResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/entities.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/entities.go
new file mode 100644
index 000000000000..3e896423ea6d
--- /dev/null
+++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/entities.go
@@ -0,0 +1,210 @@
+package managementgroups
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// EntitiesClient is the the Azure Management Groups API enables consolidation of multiple subscriptions/resources into
+// an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those
+// resources.
+type EntitiesClient struct {
+ BaseClient
+}
+
+// NewEntitiesClient creates an instance of the EntitiesClient client.
+func NewEntitiesClient() EntitiesClient {
+ return NewEntitiesClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewEntitiesClientWithBaseURI creates an instance of the EntitiesClient client.
+func NewEntitiesClientWithBaseURI(baseURI string) EntitiesClient {
+ return EntitiesClient{NewWithBaseURI(baseURI)}
+}
+
+// List list all entities (Management Groups, Subscriptions, etc.) for the authenticated user.
+// Parameters:
+// skiptoken - page continuation token is only used if a previous operation returned a partial result. If a
+// previous response contains a nextLink element, the value of the nextLink element will include a token
+// parameter that specifies a starting point to use for subsequent calls.
+// skip - number of entities to skip over when retrieving results. Passing this in will override $skipToken.
+// top - number of elements to return when retrieving results. Passing this in will override $skipToken.
+// selectParameter - this parameter specifies the fields to include in the response. Can include any
+// combination of Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g.
+// '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. When specified the $select parameter
+// can override select in $skipToken.
+// search - the $search parameter is used in conjunction with the $filter parameter to return three different
+// outputs depending on the parameter passed in. With $search=AllowedParents the API will return the entity
+// info of all groups that the requested entity will be able to reparent to as determined by the user's
+// permissions.With $search=AllowedChildren the API will return the entity info of all entities that can be
+// added as children of the requested entity.With $search=ParentAndFirstLevelChildren the API will return the
+// parent and first level of children that the user has either direct access to or indirect access via one of
+// their descendants.With $search=ParentOnly the API will return only the group if the user has access to at
+// least one of the descendants of the group.With $search=ChildrenOnly the API will return only the first level
+// of children of the group entity info specified in $filter. The user must have direct access to the children
+// entities or one of it's descendants for it to show up in the results.
+// filter - the filter parameter allows you to filter on the the name or display name fields. You can check for
+// equality on the name field (e.g. name eq '{entityName}') and you can check for substrings on either the
+// name or display name fields(e.g. contains(name, '{substringToSearch}'), contains(displayName,
+// '{substringToSearch')). Note that the '{entityName}' and '{substringToSearch}' fields are checked case
+// insensitively.
+// view - the view parameter allows clients to filter the type of data that is returned by the getEntities
+// call.
+// groupName - a filter which allows the get entities call to focus on a particular group (i.e. "$filter=name
+// eq 'groupName'")
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client EntitiesClient) List(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result EntityListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EntitiesClient.List")
+ defer func() {
+ sc := -1
+ if result.elr.Response.Response != nil {
+ sc = result.elr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, skiptoken, skip, top, selectParameter, search, filter, view, groupName, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.elr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.elr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client EntitiesClient) ListPreparer(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (*http.Request, error) {
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+ if skip != nil {
+ queryParameters["$skip"] = autorest.Encode("query", *skip)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(selectParameter) > 0 {
+ queryParameters["$select"] = autorest.Encode("query", selectParameter)
+ }
+ if len(string(search)) > 0 {
+ queryParameters["$search"] = autorest.Encode("query", search)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(string(view)) > 0 {
+ queryParameters["$view"] = autorest.Encode("query", view)
+ }
+ if len(groupName) > 0 {
+ queryParameters["groupName"] = autorest.Encode("query", groupName)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/getEntities"),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client EntitiesClient) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client EntitiesClient) ListResponder(resp *http.Response) (result EntityListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client EntitiesClient) listNextResults(ctx context.Context, lastResults EntityListResult) (result EntityListResult, err error) {
+ req, err := lastResults.entityListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client EntitiesClient) ListComplete(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result EntityListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EntitiesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, skiptoken, skip, top, selectParameter, search, filter, view, groupName, cacheControl)
+ return
+}
diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroups.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroups.go
new file mode 100644
index 000000000000..627a1a0ff13a
--- /dev/null
+++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroups.go
@@ -0,0 +1,637 @@
+package managementgroups
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// Client is the the Azure Management Groups API enables consolidation of multiple subscriptions/resources into an
+// organizational hierarchy and centrally manage access control, policies, alerting and reporting for those resources.
+type Client struct {
+ BaseClient
+}
+
+// NewClient creates an instance of the Client client.
+func NewClient() Client {
+ return NewClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewClientWithBaseURI creates an instance of the Client client.
+func NewClientWithBaseURI(baseURI string) Client {
+ return Client{NewWithBaseURI(baseURI)}
+}
+
+// CreateOrUpdate create or update a management group. If a management group is already created and a subsequent create
+// request is issued with different properties, the management group properties will be updated.
+// Parameters:
+// groupID - management Group ID.
+// createManagementGroupRequest - management group creation parameters.
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client Client) CreateOrUpdate(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, cacheControl string) (result CreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, groupID, createManagementGroupRequest, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client Client) CreateOrUpdatePreparer(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ createManagementGroupRequest.ID = nil
+ createManagementGroupRequest.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters),
+ autorest.WithJSON(createManagementGroupRequest),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req, sd...)
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client Client) CreateOrUpdateResponder(resp *http.Response) (result SetObject, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete management group. If a management group contains child resources, the request will fail.
+// Parameters:
+// groupID - management Group ID.
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client Client) Delete(ctx context.Context, groupID string, cacheControl string) (result DeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, groupID, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client Client) DeletePreparer(ctx context.Context, groupID string, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req, sd...)
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client Client) DeleteResponder(resp *http.Response) (result OperationResults, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get get the details of the management group.
+// Parameters:
+// groupID - management Group ID.
+// expand - the $expand=children query string parameter allows clients to request inclusion of children in the
+// response payload. $expand=path includes the path from the root group to the current group.
+// recurse - the $recurse=true query string parameter allows clients to request inclusion of entire hierarchy
+// in the response payload. Note that $expand=children must be passed up if $recurse is set to true.
+// filter - a filter which allows the exclusion of subscriptions from results (i.e. '$filter=children.childType
+// ne Subscription')
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client Client) Get(ctx context.Context, groupID string, expand string, recurse *bool, filter string, cacheControl string) (result ManagementGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, groupID, expand, recurse, filter, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client Client) GetPreparer(ctx context.Context, groupID string, expand string, recurse *bool, filter string, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if recurse != nil {
+ queryParameters["$recurse"] = autorest.Encode("query", *recurse)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) GetSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client Client) GetResponder(resp *http.Response) (result ManagementGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetDescendants list all entities that descend from a management group.
+// Parameters:
+// groupID - management Group ID.
+// skiptoken - page continuation token is only used if a previous operation returned a partial result. If a
+// previous response contains a nextLink element, the value of the nextLink element will include a token
+// parameter that specifies a starting point to use for subsequent calls.
+// top - number of elements to return when retrieving results. Passing this in will override $skipToken.
+func (client Client) GetDescendants(ctx context.Context, groupID string, skiptoken string, top *int32) (result DescendantListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetDescendants")
+ defer func() {
+ sc := -1
+ if result.dlr.Response.Response != nil {
+ sc = result.dlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.getDescendantsNextResults
+ req, err := client.GetDescendantsPreparer(ctx, groupID, skiptoken, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "GetDescendants", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetDescendantsSender(req)
+ if err != nil {
+ result.dlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "GetDescendants", resp, "Failure sending request")
+ return
+ }
+
+ result.dlr, err = client.GetDescendantsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "GetDescendants", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetDescendantsPreparer prepares the GetDescendants request.
+func (client Client) GetDescendantsPreparer(ctx context.Context, groupID string, skiptoken string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/descendants", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetDescendantsSender sends the GetDescendants request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) GetDescendantsSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetDescendantsResponder handles the response to the GetDescendants request. The method always
+// closes the http.Response Body.
+func (client Client) GetDescendantsResponder(resp *http.Response) (result DescendantListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// getDescendantsNextResults retrieves the next set of results, if any.
+func (client Client) getDescendantsNextResults(ctx context.Context, lastResults DescendantListResult) (result DescendantListResult, err error) {
+ req, err := lastResults.descendantListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "managementgroups.Client", "getDescendantsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.GetDescendantsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "managementgroups.Client", "getDescendantsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.GetDescendantsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "getDescendantsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// GetDescendantsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) GetDescendantsComplete(ctx context.Context, groupID string, skiptoken string, top *int32) (result DescendantListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetDescendants")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.GetDescendants(ctx, groupID, skiptoken, top)
+ return
+}
+
+// List list management groups for the authenticated user.
+// Parameters:
+// cacheControl - indicates that the request shouldn't utilize any caches.
+// skiptoken - page continuation token is only used if a previous operation returned a partial result. If a
+// previous response contains a nextLink element, the value of the nextLink element will include a token
+// parameter that specifies a starting point to use for subsequent calls.
+func (client Client) List(ctx context.Context, cacheControl string, skiptoken string) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.List")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, cacheControl, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client Client) ListPreparer(ctx context.Context, cacheControl string, skiptoken string) (*http.Request, error) {
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/managementGroups"),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client Client) ListResponder(resp *http.Response) (result ListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client Client) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "managementgroups.Client", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "managementgroups.Client", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListComplete(ctx context.Context, cacheControl string, skiptoken string) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, cacheControl, skiptoken)
+ return
+}
+
+// Update update a management group.
+// Parameters:
+// groupID - management Group ID.
+// patchGroupRequest - management group patch parameters.
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client Client) Update(ctx context.Context, groupID string, patchGroupRequest PatchManagementGroupRequest, cacheControl string) (result ManagementGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, groupID, patchGroupRequest, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client Client) UpdatePreparer(ctx context.Context, groupID string, patchGroupRequest PatchManagementGroupRequest, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters),
+ autorest.WithJSON(patchGroupRequest),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) UpdateSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client Client) UpdateResponder(resp *http.Response) (result ManagementGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroupsapi/interfaces.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroupsapi/interfaces.go
new file mode 100644
index 000000000000..9a1be3540911
--- /dev/null
+++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroupsapi/interfaces.go
@@ -0,0 +1,67 @@
+package managementgroupsapi
+
+// 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/resources/mgmt/2019-11-01/managementgroups"
+ "github.com/Azure/go-autorest/autorest"
+)
+
+// BaseClientAPI contains the set of methods on the BaseClient type.
+type BaseClientAPI interface {
+ CheckNameAvailability(ctx context.Context, checkNameAvailabilityRequest managementgroups.CheckNameAvailabilityRequest) (result managementgroups.CheckNameAvailabilityResult, err error)
+ StartTenantBackfill(ctx context.Context) (result managementgroups.TenantBackfillStatusResult, err error)
+ TenantBackfillStatus(ctx context.Context) (result managementgroups.TenantBackfillStatusResult, err error)
+}
+
+var _ BaseClientAPI = (*managementgroups.BaseClient)(nil)
+
+// ClientAPI contains the set of methods on the Client type.
+type ClientAPI interface {
+ CreateOrUpdate(ctx context.Context, groupID string, createManagementGroupRequest managementgroups.CreateManagementGroupRequest, cacheControl string) (result managementgroups.CreateOrUpdateFuture, err error)
+ Delete(ctx context.Context, groupID string, cacheControl string) (result managementgroups.DeleteFuture, err error)
+ Get(ctx context.Context, groupID string, expand string, recurse *bool, filter string, cacheControl string) (result managementgroups.ManagementGroup, err error)
+ GetDescendants(ctx context.Context, groupID string, skiptoken string, top *int32) (result managementgroups.DescendantListResultPage, err error)
+ List(ctx context.Context, cacheControl string, skiptoken string) (result managementgroups.ListResultPage, err error)
+ Update(ctx context.Context, groupID string, patchGroupRequest managementgroups.PatchManagementGroupRequest, cacheControl string) (result managementgroups.ManagementGroup, err error)
+}
+
+var _ ClientAPI = (*managementgroups.Client)(nil)
+
+// SubscriptionsClientAPI contains the set of methods on the SubscriptionsClient type.
+type SubscriptionsClientAPI interface {
+ Create(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result autorest.Response, err error)
+ Delete(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result autorest.Response, err error)
+}
+
+var _ SubscriptionsClientAPI = (*managementgroups.SubscriptionsClient)(nil)
+
+// OperationsClientAPI contains the set of methods on the OperationsClient type.
+type OperationsClientAPI interface {
+ List(ctx context.Context) (result managementgroups.OperationListResultPage, err error)
+}
+
+var _ OperationsClientAPI = (*managementgroups.OperationsClient)(nil)
+
+// EntitiesClientAPI contains the set of methods on the EntitiesClient type.
+type EntitiesClientAPI interface {
+ List(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result managementgroups.EntityListResultPage, err error)
+}
+
+var _ EntitiesClientAPI = (*managementgroups.EntitiesClient)(nil)
diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/models.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/models.go
new file mode 100644
index 000000000000..cfbe2cd72317
--- /dev/null
+++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/models.go
@@ -0,0 +1,1502 @@
+package managementgroups
+
+// 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"
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2019-11-01/managementgroups"
+
+// InheritedPermissions enumerates the values for inherited permissions.
+type InheritedPermissions string
+
+const (
+ // Delete ...
+ Delete InheritedPermissions = "delete"
+ // Edit ...
+ Edit InheritedPermissions = "edit"
+ // Noaccess ...
+ Noaccess InheritedPermissions = "noaccess"
+ // View ...
+ View InheritedPermissions = "view"
+)
+
+// PossibleInheritedPermissionsValues returns an array of possible values for the InheritedPermissions const type.
+func PossibleInheritedPermissionsValues() []InheritedPermissions {
+ return []InheritedPermissions{Delete, Edit, Noaccess, View}
+}
+
+// Permissions enumerates the values for permissions.
+type Permissions string
+
+const (
+ // PermissionsDelete ...
+ PermissionsDelete Permissions = "delete"
+ // PermissionsEdit ...
+ PermissionsEdit Permissions = "edit"
+ // PermissionsNoaccess ...
+ PermissionsNoaccess Permissions = "noaccess"
+ // PermissionsView ...
+ PermissionsView Permissions = "view"
+)
+
+// PossiblePermissionsValues returns an array of possible values for the Permissions const type.
+func PossiblePermissionsValues() []Permissions {
+ return []Permissions{PermissionsDelete, PermissionsEdit, PermissionsNoaccess, PermissionsView}
+}
+
+// Permissions1 enumerates the values for permissions 1.
+type Permissions1 string
+
+const (
+ // Permissions1Delete ...
+ Permissions1Delete Permissions1 = "delete"
+ // Permissions1Edit ...
+ Permissions1Edit Permissions1 = "edit"
+ // Permissions1Noaccess ...
+ Permissions1Noaccess Permissions1 = "noaccess"
+ // Permissions1View ...
+ Permissions1View Permissions1 = "view"
+)
+
+// PossiblePermissions1Values returns an array of possible values for the Permissions1 const type.
+func PossiblePermissions1Values() []Permissions1 {
+ return []Permissions1{Permissions1Delete, Permissions1Edit, Permissions1Noaccess, Permissions1View}
+}
+
+// Reason enumerates the values for reason.
+type Reason string
+
+const (
+ // AlreadyExists ...
+ AlreadyExists Reason = "AlreadyExists"
+ // Invalid ...
+ Invalid Reason = "Invalid"
+)
+
+// PossibleReasonValues returns an array of possible values for the Reason const type.
+func PossibleReasonValues() []Reason {
+ return []Reason{AlreadyExists, Invalid}
+}
+
+// Status enumerates the values for status.
+type Status string
+
+const (
+ // Cancelled ...
+ Cancelled Status = "Cancelled"
+ // Completed ...
+ Completed Status = "Completed"
+ // Failed ...
+ Failed Status = "Failed"
+ // NotStarted ...
+ NotStarted Status = "NotStarted"
+ // NotStartedButGroupsExist ...
+ NotStartedButGroupsExist Status = "NotStartedButGroupsExist"
+ // Started ...
+ Started Status = "Started"
+)
+
+// PossibleStatusValues returns an array of possible values for the Status const type.
+func PossibleStatusValues() []Status {
+ return []Status{Cancelled, Completed, Failed, NotStarted, NotStartedButGroupsExist, Started}
+}
+
+// Type enumerates the values for type.
+type Type string
+
+const (
+ // MicrosoftManagementmanagementGroups ...
+ MicrosoftManagementmanagementGroups Type = "Microsoft.Management/managementGroups"
+)
+
+// PossibleTypeValues returns an array of possible values for the Type const type.
+func PossibleTypeValues() []Type {
+ return []Type{MicrosoftManagementmanagementGroups}
+}
+
+// Type1 enumerates the values for type 1.
+type Type1 string
+
+const (
+ // Type1MicrosoftManagementmanagementGroups ...
+ Type1MicrosoftManagementmanagementGroups Type1 = "Microsoft.Management/managementGroups"
+ // Type1Subscriptions ...
+ Type1Subscriptions Type1 = "/subscriptions"
+)
+
+// PossibleType1Values returns an array of possible values for the Type1 const type.
+func PossibleType1Values() []Type1 {
+ return []Type1{Type1MicrosoftManagementmanagementGroups, Type1Subscriptions}
+}
+
+// Type2 enumerates the values for type 2.
+type Type2 string
+
+const (
+ // Type2MicrosoftManagementmanagementGroups ...
+ Type2MicrosoftManagementmanagementGroups Type2 = "Microsoft.Management/managementGroups"
+ // Type2Subscriptions ...
+ Type2Subscriptions Type2 = "/subscriptions"
+)
+
+// PossibleType2Values returns an array of possible values for the Type2 const type.
+func PossibleType2Values() []Type2 {
+ return []Type2{Type2MicrosoftManagementmanagementGroups, Type2Subscriptions}
+}
+
+// CheckNameAvailabilityRequest management group name availability check parameters.
+type CheckNameAvailabilityRequest struct {
+ // Name - the name to check for availability
+ Name *string `json:"name,omitempty"`
+ // Type - fully qualified resource type which includes provider namespace. Possible values include: 'MicrosoftManagementmanagementGroups'
+ Type Type `json:"type,omitempty"`
+}
+
+// CheckNameAvailabilityResult describes the result of the request to check management group name
+// availability.
+type CheckNameAvailabilityResult struct {
+ autorest.Response `json:"-"`
+ // NameAvailable - READ-ONLY; Required. True indicates name is valid and available. False indicates the name is invalid, unavailable, or both.
+ NameAvailable *bool `json:"nameAvailable,omitempty"`
+ // Reason - READ-ONLY; Required if nameAvailable == false. Invalid indicates the name provided does not match the resource provider's naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. Possible values include: 'Invalid', 'AlreadyExists'
+ Reason Reason `json:"reason,omitempty"`
+ // Message - READ-ONLY; Required if nameAvailable == false. Localized. If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name.
+ Message *string `json:"message,omitempty"`
+}
+
+// ChildInfo the child information of a management group.
+type ChildInfo struct {
+ // Type - The fully qualified resource type which includes provider namespace (e.g. Microsoft.Management/managementGroups). Possible values include: 'Type1MicrosoftManagementmanagementGroups', 'Type1Subscriptions'
+ Type Type1 `json:"type,omitempty"`
+ // ID - The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the child entity.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The friendly name of the child resource.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Roles - The roles definitions associated with the management group.
+ Roles *[]string `json:"roles,omitempty"`
+ // Children - The list of children.
+ Children *[]ChildInfo `json:"children,omitempty"`
+}
+
+// CreateManagementGroupChildInfo the child information of a management group used during creation.
+type CreateManagementGroupChildInfo struct {
+ // Type - READ-ONLY; The fully qualified resource type which includes provider namespace (e.g. Microsoft.Management/managementGroups). Possible values include: 'Type2MicrosoftManagementmanagementGroups', 'Type2Subscriptions'
+ Type Type2 `json:"type,omitempty"`
+ // ID - READ-ONLY; The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the child entity.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - READ-ONLY; The friendly name of the child resource.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Roles - READ-ONLY; The roles definitions associated with the management group.
+ Roles *[]string `json:"roles,omitempty"`
+ // Children - READ-ONLY; The list of children.
+ Children *[]CreateManagementGroupChildInfo `json:"children,omitempty"`
+}
+
+// CreateManagementGroupDetails the details of a management group used during creation.
+type CreateManagementGroupDetails struct {
+ // Version - READ-ONLY; The version number of the object.
+ Version *float64 `json:"version,omitempty"`
+ // UpdatedTime - READ-ONLY; The date and time when this object was last updated.
+ UpdatedTime *date.Time `json:"updatedTime,omitempty"`
+ // UpdatedBy - READ-ONLY; The identity of the principal or process that updated the object.
+ UpdatedBy *string `json:"updatedBy,omitempty"`
+ Parent *CreateParentGroupInfo `json:"parent,omitempty"`
+}
+
+// CreateManagementGroupProperties the generic properties of a management group used during creation.
+type CreateManagementGroupProperties struct {
+ // TenantID - READ-ONLY; The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
+ TenantID *string `json:"tenantId,omitempty"`
+ // DisplayName - The friendly name of the management group. If no value is passed then this field will be set to the groupId.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Roles - READ-ONLY; The roles definitions associated with the management group.
+ Roles *[]string `json:"roles,omitempty"`
+ Details *CreateManagementGroupDetails `json:"details,omitempty"`
+ // Children - READ-ONLY; The list of children.
+ Children *[]CreateManagementGroupChildInfo `json:"children,omitempty"`
+}
+
+// CreateManagementGroupRequest management group creation parameters.
+type CreateManagementGroupRequest struct {
+ // ID - READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *CreateManagementGroupProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CreateManagementGroupRequest.
+func (cmgr CreateManagementGroupRequest) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cmgr.Name != nil {
+ objectMap["name"] = cmgr.Name
+ }
+ if cmgr.CreateManagementGroupProperties != nil {
+ objectMap["properties"] = cmgr.CreateManagementGroupProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for CreateManagementGroupRequest struct.
+func (cmgr *CreateManagementGroupRequest) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ cmgr.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cmgr.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cmgr.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var createManagementGroupProperties CreateManagementGroupProperties
+ err = json.Unmarshal(*v, &createManagementGroupProperties)
+ if err != nil {
+ return err
+ }
+ cmgr.CreateManagementGroupProperties = &createManagementGroupProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type CreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *CreateOrUpdateFuture) Result(client Client) (so SetObject, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managementgroups.CreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.CreateOrUpdateResponder(so.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", so.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// CreateParentGroupInfo (Optional) The ID of the parent management group used during creation.
+type CreateParentGroupInfo struct {
+ // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the parent management group
+ Name *string `json:"name,omitempty"`
+ // DisplayName - READ-ONLY; The friendly name of the parent management group.
+ DisplayName *string `json:"displayName,omitempty"`
+}
+
+// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type DeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DeleteFuture) Result(client Client) (or OperationResults, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managementgroups.DeleteFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if or.Response.Response, err = future.GetResult(sender); err == nil && or.Response.Response.StatusCode != http.StatusNoContent {
+ or, err = client.DeleteResponder(or.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", or.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DescendantInfo the descendant.
+type DescendantInfo struct {
+ // ID - READ-ONLY; The fully qualified ID for the descendant. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 or /subscriptions/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups or /subscriptions
+ Type *string `json:"type,omitempty"`
+ // Name - READ-ONLY; The name of the descendant. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *DescendantInfoProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DescendantInfo.
+func (di DescendantInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if di.DescendantInfoProperties != nil {
+ objectMap["properties"] = di.DescendantInfoProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DescendantInfo struct.
+func (di *DescendantInfo) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ di.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ di.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ di.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var descendantInfoProperties DescendantInfoProperties
+ err = json.Unmarshal(*v, &descendantInfoProperties)
+ if err != nil {
+ return err
+ }
+ di.DescendantInfoProperties = &descendantInfoProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// DescendantInfoProperties the generic properties of an descendant.
+type DescendantInfoProperties struct {
+ // DisplayName - The friendly name of the management group.
+ DisplayName *string `json:"displayName,omitempty"`
+ Parent *DescendantParentGroupInfo `json:"parent,omitempty"`
+}
+
+// DescendantListResult describes the result of the request to view descendants.
+type DescendantListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of descendants.
+ Value *[]DescendantInfo `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DescendantListResultIterator provides access to a complete listing of DescendantInfo values.
+type DescendantListResultIterator struct {
+ i int
+ page DescendantListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DescendantListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DescendantListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DescendantListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DescendantListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DescendantListResultIterator) Response() DescendantListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DescendantListResultIterator) Value() DescendantInfo {
+ if !iter.page.NotDone() {
+ return DescendantInfo{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DescendantListResultIterator type.
+func NewDescendantListResultIterator(page DescendantListResultPage) DescendantListResultIterator {
+ return DescendantListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dlr DescendantListResult) IsEmpty() bool {
+ return dlr.Value == nil || len(*dlr.Value) == 0
+}
+
+// descendantListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dlr DescendantListResult) descendantListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if dlr.NextLink == nil || len(to.String(dlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dlr.NextLink)))
+}
+
+// DescendantListResultPage contains a page of DescendantInfo values.
+type DescendantListResultPage struct {
+ fn func(context.Context, DescendantListResult) (DescendantListResult, error)
+ dlr DescendantListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DescendantListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DescendantListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dlr)
+ if err != nil {
+ return err
+ }
+ page.dlr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DescendantListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DescendantListResultPage) NotDone() bool {
+ return !page.dlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DescendantListResultPage) Response() DescendantListResult {
+ return page.dlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DescendantListResultPage) Values() []DescendantInfo {
+ if page.dlr.IsEmpty() {
+ return nil
+ }
+ return *page.dlr.Value
+}
+
+// Creates a new instance of the DescendantListResultPage type.
+func NewDescendantListResultPage(getNextPage func(context.Context, DescendantListResult) (DescendantListResult, error)) DescendantListResultPage {
+ return DescendantListResultPage{fn: getNextPage}
+}
+
+// DescendantParentGroupInfo the ID of the parent management group.
+type DescendantParentGroupInfo struct {
+ // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+}
+
+// Details the details of a management group.
+type Details struct {
+ // Version - The version number of the object.
+ Version *float64 `json:"version,omitempty"`
+ // UpdatedTime - The date and time when this object was last updated.
+ UpdatedTime *date.Time `json:"updatedTime,omitempty"`
+ // UpdatedBy - The identity of the principal or process that updated the object.
+ UpdatedBy *string `json:"updatedBy,omitempty"`
+ Parent *ParentGroupInfo `json:"parent,omitempty"`
+}
+
+// EntityHierarchyItem the management group details for the hierarchy view.
+type EntityHierarchyItem struct {
+ // ID - READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *EntityHierarchyItemProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for EntityHierarchyItem.
+func (ehi EntityHierarchyItem) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ehi.EntityHierarchyItemProperties != nil {
+ objectMap["properties"] = ehi.EntityHierarchyItemProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for EntityHierarchyItem struct.
+func (ehi *EntityHierarchyItem) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ehi.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ehi.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ehi.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var entityHierarchyItemProperties EntityHierarchyItemProperties
+ err = json.Unmarshal(*v, &entityHierarchyItemProperties)
+ if err != nil {
+ return err
+ }
+ ehi.EntityHierarchyItemProperties = &entityHierarchyItemProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// EntityHierarchyItemProperties the generic properties of a management group.
+type EntityHierarchyItemProperties struct {
+ // DisplayName - The friendly name of the management group.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Permissions - Possible values include: 'Permissions1Noaccess', 'Permissions1View', 'Permissions1Edit', 'Permissions1Delete'
+ Permissions Permissions1 `json:"permissions,omitempty"`
+ // Children - The list of children.
+ Children *[]EntityHierarchyItem `json:"children,omitempty"`
+}
+
+// EntityInfo the entity.
+type EntityInfo struct {
+ // ID - READ-ONLY; The fully qualified ID for the entity. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - READ-ONLY; The name of the entity. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *EntityInfoProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for EntityInfo.
+func (ei EntityInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ei.EntityInfoProperties != nil {
+ objectMap["properties"] = ei.EntityInfoProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for EntityInfo struct.
+func (ei *EntityInfo) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ei.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ei.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ei.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var entityInfoProperties EntityInfoProperties
+ err = json.Unmarshal(*v, &entityInfoProperties)
+ if err != nil {
+ return err
+ }
+ ei.EntityInfoProperties = &entityInfoProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// EntityInfoProperties the generic properties of an entity.
+type EntityInfoProperties struct {
+ // TenantID - The AAD Tenant ID associated with the entity. For example, 00000000-0000-0000-0000-000000000000
+ TenantID *string `json:"tenantId,omitempty"`
+ // DisplayName - The friendly name of the management group.
+ DisplayName *string `json:"displayName,omitempty"`
+ Parent *EntityParentGroupInfo `json:"parent,omitempty"`
+ // Permissions - Possible values include: 'PermissionsNoaccess', 'PermissionsView', 'PermissionsEdit', 'PermissionsDelete'
+ Permissions Permissions `json:"permissions,omitempty"`
+ // InheritedPermissions - Possible values include: 'Noaccess', 'View', 'Edit', 'Delete'
+ InheritedPermissions InheritedPermissions `json:"inheritedPermissions,omitempty"`
+ NumberOfDescendants *int32 `json:"numberOfDescendants,omitempty"`
+ // NumberOfChildren - Number of children is the number of Groups and Subscriptions that are exactly one level underneath the current Group.
+ NumberOfChildren *int32 `json:"numberOfChildren,omitempty"`
+ // NumberOfChildGroups - Number of children is the number of Groups that are exactly one level underneath the current Group.
+ NumberOfChildGroups *int32 `json:"numberOfChildGroups,omitempty"`
+ // ParentDisplayNameChain - The parent display name chain from the root group to the immediate parent
+ ParentDisplayNameChain *[]string `json:"parentDisplayNameChain,omitempty"`
+ // ParentNameChain - The parent name chain from the root group to the immediate parent
+ ParentNameChain *[]string `json:"parentNameChain,omitempty"`
+}
+
+// EntityListResult describes the result of the request to view entities.
+type EntityListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of entities.
+ Value *[]EntityInfo `json:"value,omitempty"`
+ // Count - READ-ONLY; Total count of records that match the filter
+ Count *int32 `json:"count,omitempty"`
+ // NextLink - READ-ONLY; The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// EntityListResultIterator provides access to a complete listing of EntityInfo values.
+type EntityListResultIterator struct {
+ i int
+ page EntityListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *EntityListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EntityListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *EntityListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter EntityListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter EntityListResultIterator) Response() EntityListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter EntityListResultIterator) Value() EntityInfo {
+ if !iter.page.NotDone() {
+ return EntityInfo{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the EntityListResultIterator type.
+func NewEntityListResultIterator(page EntityListResultPage) EntityListResultIterator {
+ return EntityListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (elr EntityListResult) IsEmpty() bool {
+ return elr.Value == nil || len(*elr.Value) == 0
+}
+
+// entityListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (elr EntityListResult) entityListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if elr.NextLink == nil || len(to.String(elr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(elr.NextLink)))
+}
+
+// EntityListResultPage contains a page of EntityInfo values.
+type EntityListResultPage struct {
+ fn func(context.Context, EntityListResult) (EntityListResult, error)
+ elr EntityListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *EntityListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EntityListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.elr)
+ if err != nil {
+ return err
+ }
+ page.elr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *EntityListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page EntityListResultPage) NotDone() bool {
+ return !page.elr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page EntityListResultPage) Response() EntityListResult {
+ return page.elr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page EntityListResultPage) Values() []EntityInfo {
+ if page.elr.IsEmpty() {
+ return nil
+ }
+ return *page.elr.Value
+}
+
+// Creates a new instance of the EntityListResultPage type.
+func NewEntityListResultPage(getNextPage func(context.Context, EntityListResult) (EntityListResult, error)) EntityListResultPage {
+ return EntityListResultPage{fn: getNextPage}
+}
+
+// EntityParentGroupInfo (Optional) The ID of the parent management group.
+type EntityParentGroupInfo struct {
+ // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+}
+
+// ErrorDetails the details of the error.
+type ErrorDetails struct {
+ // Code - One of a server-defined set of error codes.
+ Code *string `json:"code,omitempty"`
+ // Message - A human-readable representation of the error.
+ Message *string `json:"message,omitempty"`
+ // Details - A human-readable representation of the error's details.
+ Details *string `json:"details,omitempty"`
+}
+
+// ErrorResponse the error object.
+type ErrorResponse struct {
+ Error *ErrorDetails `json:"error,omitempty"`
+}
+
+// Info the management group resource.
+type Info struct {
+ // ID - READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *InfoProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Info.
+func (i Info) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if i.InfoProperties != nil {
+ objectMap["properties"] = i.InfoProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Info struct.
+func (i *Info) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ i.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ i.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ i.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var infoProperties InfoProperties
+ err = json.Unmarshal(*v, &infoProperties)
+ if err != nil {
+ return err
+ }
+ i.InfoProperties = &infoProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// InfoProperties the generic properties of a management group.
+type InfoProperties struct {
+ // TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
+ TenantID *string `json:"tenantId,omitempty"`
+ // DisplayName - The friendly name of the management group.
+ DisplayName *string `json:"displayName,omitempty"`
+}
+
+// ListResult describes the result of the request to list management groups.
+type ListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of management groups.
+ Value *[]Info `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListResultIterator provides access to a complete listing of Info values.
+type ListResultIterator struct {
+ i int
+ page ListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ListResultIterator) Response() ListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ListResultIterator) Value() Info {
+ if !iter.page.NotDone() {
+ return Info{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ListResultIterator type.
+func NewListResultIterator(page ListResultPage) ListResultIterator {
+ return ListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lr ListResult) IsEmpty() bool {
+ return lr.Value == nil || len(*lr.Value) == 0
+}
+
+// listResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) {
+ if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lr.NextLink)))
+}
+
+// ListResultPage contains a page of Info values.
+type ListResultPage struct {
+ fn func(context.Context, ListResult) (ListResult, error)
+ lr ListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lr)
+ if err != nil {
+ return err
+ }
+ page.lr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListResultPage) NotDone() bool {
+ return !page.lr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListResultPage) Response() ListResult {
+ return page.lr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListResultPage) Values() []Info {
+ if page.lr.IsEmpty() {
+ return nil
+ }
+ return *page.lr.Value
+}
+
+// Creates a new instance of the ListResultPage type.
+func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return ListResultPage{fn: getNextPage}
+}
+
+// ManagementGroup the management group details.
+type ManagementGroup struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *Properties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagementGroup.
+func (mg ManagementGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mg.Properties != nil {
+ objectMap["properties"] = mg.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ManagementGroup struct.
+func (mg *ManagementGroup) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ mg.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ mg.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ mg.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var properties Properties
+ err = json.Unmarshal(*v, &properties)
+ if err != nil {
+ return err
+ }
+ mg.Properties = &properties
+ }
+ }
+ }
+
+ return nil
+}
+
+// Operation operation supported by the Microsoft.Management resource provider.
+type Operation struct {
+ // Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}.
+ Name *string `json:"name,omitempty"`
+ Display *OperationDisplayProperties `json:"display,omitempty"`
+}
+
+// OperationDisplayProperties the object that represents the operation.
+type OperationDisplayProperties struct {
+ // Provider - READ-ONLY; The name of the provider.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - READ-ONLY; The resource on which the operation is performed.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - READ-ONLY; The operation that can be performed.
+ Operation *string `json:"operation,omitempty"`
+ // Description - READ-ONLY; Operation description.
+ Description *string `json:"description,omitempty"`
+}
+
+// OperationListResult describes the result of the request to list Microsoft.Management operations.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; List of operations supported by the Microsoft.Management resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+ // NextLink - READ-ONLY; URL to get the next set of operation list results if there are any.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OperationListResultIterator provides access to a complete listing of Operation values.
+type OperationListResultIterator struct {
+ i int
+ page OperationListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OperationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OperationListResultIterator) Response() OperationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OperationListResultIterator) Value() Operation {
+ if !iter.page.NotDone() {
+ return 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
+}
+
+// operationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(olr.NextLink)))
+}
+
+// OperationListResultPage contains a page of Operation values.
+type OperationListResultPage struct {
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
+ olr OperationListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
+ if err != nil {
+ return err
+ }
+ page.olr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OperationListResultPage) NotDone() bool {
+ return !page.olr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OperationListResultPage) Response() OperationListResult {
+ return page.olr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OperationListResultPage) Values() []Operation {
+ if page.olr.IsEmpty() {
+ return nil
+ }
+ 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}
+}
+
+// OperationResults the results of an asynchronous operation.
+type OperationResults struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ // Status - READ-ONLY; The current status of the operation
+ Status *string `json:"status,omitempty"`
+}
+
+// ParentGroupInfo (Optional) The ID of the parent management group.
+type ParentGroupInfo struct {
+ // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the parent management group
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The friendly name of the parent management group.
+ DisplayName *string `json:"displayName,omitempty"`
+}
+
+// PatchManagementGroupRequest management group patch parameters.
+type PatchManagementGroupRequest struct {
+ // DisplayName - The friendly name of the management group.
+ DisplayName *string `json:"displayName,omitempty"`
+ // ParentID - (Optional) The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ParentID *string `json:"parentId,omitempty"`
+}
+
+// PathElement a path element of a management group ancestors.
+type PathElement struct {
+ // Name - The name of the group.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The friendly name of the group.
+ DisplayName *string `json:"displayName,omitempty"`
+}
+
+// Properties the generic properties of a management group.
+type Properties struct {
+ // TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
+ TenantID *string `json:"tenantId,omitempty"`
+ // DisplayName - The friendly name of the management group.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Roles - The role definitions associated with the management group.
+ Roles *[]string `json:"roles,omitempty"`
+ Details *Details `json:"details,omitempty"`
+ // Children - The list of children.
+ Children *[]ChildInfo `json:"children,omitempty"`
+ // Path - The hierarchial path from the root group to the current group.
+ Path *[]PathElement `json:"path,omitempty"`
+}
+
+// SetObject ...
+type SetObject struct {
+ autorest.Response `json:"-"`
+ Value interface{} `json:"value,omitempty"`
+}
+
+// TenantBackfillStatusResult the tenant backfill status
+type TenantBackfillStatusResult struct {
+ autorest.Response `json:"-"`
+ // TenantID - READ-ONLY; The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
+ TenantID *string `json:"tenantId,omitempty"`
+ // Status - READ-ONLY; The status of the Tenant Backfill. Possible values include: 'NotStarted', 'NotStartedButGroupsExist', 'Started', 'Failed', 'Cancelled', 'Completed'
+ Status Status `json:"status,omitempty"`
+}
diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/operations.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/operations.go
new file mode 100644
index 000000000000..5bebd8a89e72
--- /dev/null
+++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/operations.go
@@ -0,0 +1,149 @@
+package managementgroups
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// OperationsClient is the the Azure Management Groups API enables consolidation of multiple subscriptions/resources
+// into an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those
+// resources.
+type OperationsClient struct {
+ BaseClient
+}
+
+// NewOperationsClient creates an instance of the OperationsClient client.
+func NewOperationsClient() OperationsClient {
+ return NewOperationsClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
+func NewOperationsClientWithBaseURI(baseURI string) OperationsClient {
+ return OperationsClient{NewWithBaseURI(baseURI)}
+}
+
+// List lists all of the available Management REST API operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.olr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.olr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/subscriptions.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/subscriptions.go
new file mode 100644
index 000000000000..f3cb269d9bf6
--- /dev/null
+++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/subscriptions.go
@@ -0,0 +1,209 @@
+package managementgroups
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// SubscriptionsClient is the the Azure Management Groups API enables consolidation of multiple subscriptions/resources
+// into an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those
+// resources.
+type SubscriptionsClient struct {
+ BaseClient
+}
+
+// NewSubscriptionsClient creates an instance of the SubscriptionsClient client.
+func NewSubscriptionsClient() SubscriptionsClient {
+ return NewSubscriptionsClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client.
+func NewSubscriptionsClientWithBaseURI(baseURI string) SubscriptionsClient {
+ return SubscriptionsClient{NewWithBaseURI(baseURI)}
+}
+
+// Create associates existing subscription with the management group.
+// Parameters:
+// groupID - management Group ID.
+// subscriptionID - subscription ID.
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client SubscriptionsClient) Create(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionsClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreatePreparer(ctx, groupID, subscriptionID, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Create", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Create", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client SubscriptionsClient) CreatePreparer(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ "subscriptionId": autorest.Encode("path", subscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client SubscriptionsClient) CreateSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client SubscriptionsClient) CreateResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Delete de-associates subscription from the management group.
+// Parameters:
+// groupID - management Group ID.
+// subscriptionID - subscription ID.
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client SubscriptionsClient) Delete(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, groupID, subscriptionID, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SubscriptionsClient) DeletePreparer(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ "subscriptionId": autorest.Encode("path", subscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SubscriptionsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SubscriptionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/version.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/version.go
new file mode 100644
index 000000000000..cf92d4e2e6b9
--- /dev/null
+++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/version.go
@@ -0,0 +1,30 @@
+package managementgroups
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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.
+
+// UserAgent returns the UserAgent string to use when sending http.Requests.
+func UserAgent() string {
+ return "Azure-SDK-For-Go/" + version.Number + " managementgroups/2019-11-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go
index b474b9a4c669..7c5aaa59b0f4 100644
--- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go
+++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go
@@ -661,13 +661,15 @@ const (
AzureAdvancedThreatProtection MicrosoftSecurityProductName = "Azure Advanced Threat Protection"
// AzureSecurityCenter ...
AzureSecurityCenter MicrosoftSecurityProductName = "Azure Security Center"
+ // AzureSecurityCenterforIoT ...
+ AzureSecurityCenterforIoT MicrosoftSecurityProductName = "Azure Security Center for IoT"
// MicrosoftCloudAppSecurity ...
MicrosoftCloudAppSecurity MicrosoftSecurityProductName = "Microsoft Cloud App Security"
)
// PossibleMicrosoftSecurityProductNameValues returns an array of possible values for the MicrosoftSecurityProductName const type.
func PossibleMicrosoftSecurityProductNameValues() []MicrosoftSecurityProductName {
- return []MicrosoftSecurityProductName{AzureActiveDirectoryIdentityProtection, AzureAdvancedThreatProtection, AzureSecurityCenter, MicrosoftCloudAppSecurity}
+ return []MicrosoftSecurityProductName{AzureActiveDirectoryIdentityProtection, AzureAdvancedThreatProtection, AzureSecurityCenter, AzureSecurityCenterforIoT, MicrosoftCloudAppSecurity}
}
// OSFamily enumerates the values for os family.
@@ -7661,7 +7663,7 @@ func (msicar *MicrosoftSecurityIncidentCreationAlertRule) UnmarshalJSON(body []b
type MicrosoftSecurityIncidentCreationAlertRuleCommonProperties struct {
// DisplayNamesFilter - the alerts' displayNames on which the cases will be generated
DisplayNamesFilter *[]string `json:"displayNamesFilter,omitempty"`
- // ProductFilter - The alerts' productName on which the cases will be generated. Possible values include: 'MicrosoftCloudAppSecurity', 'AzureSecurityCenter', 'AzureAdvancedThreatProtection', 'AzureActiveDirectoryIdentityProtection'
+ // ProductFilter - The alerts' productName on which the cases will be generated. Possible values include: 'MicrosoftCloudAppSecurity', 'AzureSecurityCenter', 'AzureAdvancedThreatProtection', 'AzureActiveDirectoryIdentityProtection', 'AzureSecurityCenterforIoT'
ProductFilter MicrosoftSecurityProductName `json:"productFilter,omitempty"`
// SeveritiesFilter - the alerts' severities on which the cases will be generated
SeveritiesFilter *[]AlertSeverity `json:"severitiesFilter,omitempty"`
@@ -7684,7 +7686,7 @@ type MicrosoftSecurityIncidentCreationAlertRuleProperties struct {
Tactics *[]AttackTactic `json:"tactics,omitempty"`
// DisplayNamesFilter - the alerts' displayNames on which the cases will be generated
DisplayNamesFilter *[]string `json:"displayNamesFilter,omitempty"`
- // ProductFilter - The alerts' productName on which the cases will be generated. Possible values include: 'MicrosoftCloudAppSecurity', 'AzureSecurityCenter', 'AzureAdvancedThreatProtection', 'AzureActiveDirectoryIdentityProtection'
+ // ProductFilter - The alerts' productName on which the cases will be generated. Possible values include: 'MicrosoftCloudAppSecurity', 'AzureSecurityCenter', 'AzureAdvancedThreatProtection', 'AzureActiveDirectoryIdentityProtection', 'AzureSecurityCenterforIoT'
ProductFilter MicrosoftSecurityProductName `json:"productFilter,omitempty"`
// SeveritiesFilter - the alerts' severities on which the cases will be generated
SeveritiesFilter *[]AlertSeverity `json:"severitiesFilter,omitempty"`
@@ -7822,7 +7824,7 @@ type MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties struct {
Tactics *[]AttackTactic `json:"tactics,omitempty"`
// DisplayNamesFilter - the alerts' displayNames on which the cases will be generated
DisplayNamesFilter *[]string `json:"displayNamesFilter,omitempty"`
- // ProductFilter - The alerts' productName on which the cases will be generated. Possible values include: 'MicrosoftCloudAppSecurity', 'AzureSecurityCenter', 'AzureAdvancedThreatProtection', 'AzureActiveDirectoryIdentityProtection'
+ // ProductFilter - The alerts' productName on which the cases will be generated. Possible values include: 'MicrosoftCloudAppSecurity', 'AzureSecurityCenter', 'AzureAdvancedThreatProtection', 'AzureActiveDirectoryIdentityProtection', 'AzureSecurityCenterforIoT'
ProductFilter MicrosoftSecurityProductName `json:"productFilter,omitempty"`
// SeveritiesFilter - the alerts' severities on which the cases will be generated
SeveritiesFilter *[]AlertSeverity `json:"severitiesFilter,omitempty"`
diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/databases.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/databases.go
index fc4ef2661cfd..6e99278108ed 100644
--- a/services/preview/sql/mgmt/2018-06-01-preview/sql/databases.go
+++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/databases.go
@@ -48,7 +48,8 @@ func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) Databa
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
// databaseName - the name of the database to failover.
-func (client DatabasesClient) Failover(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabasesFailoverFuture, err error) {
+// replicaType - the type of replica to be failed over.
+func (client DatabasesClient) Failover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, replicaType ReplicaType) (result DatabasesFailoverFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Failover")
defer func() {
@@ -59,7 +60,7 @@ func (client DatabasesClient) Failover(ctx context.Context, resourceGroupName st
tracing.EndSpan(ctx, sc, err)
}()
}
- req, err := client.FailoverPreparer(ctx, resourceGroupName, serverName, databaseName)
+ req, err := client.FailoverPreparer(ctx, resourceGroupName, serverName, databaseName, replicaType)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Failover", nil, "Failure preparing request")
return
@@ -75,7 +76,7 @@ func (client DatabasesClient) Failover(ctx context.Context, resourceGroupName st
}
// FailoverPreparer prepares the Failover request.
-func (client DatabasesClient) FailoverPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) {
+func (client DatabasesClient) FailoverPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, replicaType ReplicaType) (*http.Request, error) {
pathParameters := map[string]interface{}{
"databaseName": autorest.Encode("path", databaseName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -87,6 +88,9 @@ func (client DatabasesClient) FailoverPreparer(ctx context.Context, resourceGrou
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
+ if len(string(replicaType)) > 0 {
+ queryParameters["replicaType"] = autorest.Encode("query", replicaType)
+ }
preparer := autorest.CreatePreparer(
autorest.AsPost(),
diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go
index 6826ef42f89c..6a41d0d53f0b 100644
--- a/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go
+++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go
@@ -166,6 +166,21 @@ func PossibleManagedServerCreateModeValues() []ManagedServerCreateMode {
return []ManagedServerCreateMode{ManagedServerCreateModeDefault, ManagedServerCreateModePointInTimeRestore}
}
+// ReplicaType enumerates the values for replica type.
+type ReplicaType string
+
+const (
+ // Primary ...
+ Primary ReplicaType = "Primary"
+ // ReadableSecondary ...
+ ReadableSecondary ReplicaType = "ReadableSecondary"
+)
+
+// PossibleReplicaTypeValues returns an array of possible values for the ReplicaType const type.
+func PossibleReplicaTypeValues() []ReplicaType {
+ return []ReplicaType{Primary, ReadableSecondary}
+}
+
// SecurityAlertPolicyState enumerates the values for security alert policy state.
type SecurityAlertPolicyState string
diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go
index 141c762e5f0a..e448e7707d38 100644
--- a/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go
+++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go
@@ -118,7 +118,7 @@ var _ ManagedDatabasesClientAPI = (*sql.ManagedDatabasesClient)(nil)
// DatabasesClientAPI contains the set of methods on the DatabasesClient type.
type DatabasesClientAPI interface {
- Failover(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabasesFailoverFuture, err error)
+ Failover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, replicaType sql.ReplicaType) (result sql.DatabasesFailoverFuture, err error)
}
var _ DatabasesClientAPI = (*sql.DatabasesClient)(nil)
diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go
index cf1696357508..3c2ed91511f3 100644
--- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go
+++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go
@@ -449,8 +449,9 @@ func (client EnvironmentsClient) ListBySubscriptionResponder(resp *http.Response
// resourceGroupName - name of an Azure Resource group.
// environmentName - the name of the Time Series Insights environment associated with the specified resource
// group.
-// environmentUpdateParameters - request object that contains the updated information for the environment.
-func (client EnvironmentsClient) Update(ctx context.Context, resourceGroupName string, environmentName string, environmentUpdateParameters EnvironmentUpdateParameters) (result EnvironmentsUpdateFuture, err error) {
+// standardEnvironmentUpdateParameters - request object that contains the updated information for the
+// environment.
+func (client EnvironmentsClient) Update(ctx context.Context, resourceGroupName string, environmentName string, standardEnvironmentUpdateParameters StandardEnvironmentUpdateParameters) (result EnvironmentsUpdateFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/EnvironmentsClient.Update")
defer func() {
@@ -461,7 +462,7 @@ func (client EnvironmentsClient) Update(ctx context.Context, resourceGroupName s
tracing.EndSpan(ctx, sc, err)
}()
}
- req, err := client.UpdatePreparer(ctx, resourceGroupName, environmentName, environmentUpdateParameters)
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, environmentName, standardEnvironmentUpdateParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsClient", "Update", nil, "Failure preparing request")
return
@@ -477,7 +478,7 @@ func (client EnvironmentsClient) Update(ctx context.Context, resourceGroupName s
}
// UpdatePreparer prepares the Update request.
-func (client EnvironmentsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, environmentName string, environmentUpdateParameters EnvironmentUpdateParameters) (*http.Request, error) {
+func (client EnvironmentsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, environmentName string, standardEnvironmentUpdateParameters StandardEnvironmentUpdateParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"environmentName": autorest.Encode("path", environmentName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -494,7 +495,7 @@ func (client EnvironmentsClient) UpdatePreparer(ctx context.Context, resourceGro
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}", pathParameters),
- autorest.WithJSON(environmentUpdateParameters),
+ autorest.WithJSON(standardEnvironmentUpdateParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/models.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/models.go
index 979e8479be63..668b58548d1f 100644
--- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/models.go
+++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/models.go
@@ -230,6 +230,8 @@ type SkuName string
const (
// L1 ...
L1 SkuName = "L1"
+ // P1 ...
+ P1 SkuName = "P1"
// S1 ...
S1 SkuName = "S1"
// S2 ...
@@ -238,7 +240,7 @@ const (
// PossibleSkuNameValues returns an array of possible values for the SkuName const type.
func PossibleSkuNameValues() []SkuName {
- return []SkuName{L1, S1, S2}
+ return []SkuName{L1, P1, S1, S2}
}
// StorageLimitExceededBehavior enumerates the values for storage limit exceeded behavior.
@@ -256,6 +258,23 @@ func PossibleStorageLimitExceededBehaviorValues() []StorageLimitExceededBehavior
return []StorageLimitExceededBehavior{PauseIngress, PurgeOldData}
}
+// WarmStoragePropertiesState enumerates the values for warm storage properties state.
+type WarmStoragePropertiesState string
+
+const (
+ // WarmStoragePropertiesStateError ...
+ WarmStoragePropertiesStateError WarmStoragePropertiesState = "Error"
+ // WarmStoragePropertiesStateOk ...
+ WarmStoragePropertiesStateOk WarmStoragePropertiesState = "Ok"
+ // WarmStoragePropertiesStateUnknown ...
+ WarmStoragePropertiesStateUnknown WarmStoragePropertiesState = "Unknown"
+)
+
+// PossibleWarmStoragePropertiesStateValues returns an array of possible values for the WarmStoragePropertiesState const type.
+func PossibleWarmStoragePropertiesStateValues() []WarmStoragePropertiesState {
+ return []WarmStoragePropertiesState{WarmStoragePropertiesStateError, WarmStoragePropertiesStateOk, WarmStoragePropertiesStateUnknown}
+}
+
// AccessPolicyCreateOrUpdateParameters ...
type AccessPolicyCreateOrUpdateParameters struct {
*AccessPolicyResourceProperties `json:"properties,omitempty"`
@@ -794,6 +813,8 @@ type EnvironmentStateDetails struct {
type EnvironmentStatus struct {
// Ingress - An object that represents the status of ingress on an environment.
Ingress *IngressEnvironmentStatus `json:"ingress,omitempty"`
+ // WarmStorage - An object that represents the status of warm storage on an environment.
+ WarmStorage *WarmStorageEnvironmentStatus `json:"warmStorage,omitempty"`
}
// EnvironmentsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
@@ -1990,6 +2011,65 @@ type LongTermEnvironmentCreationProperties struct {
TimeSeriesIDProperties *[]TimeSeriesIDProperty `json:"timeSeriesIdProperties,omitempty"`
// StorageConfiguration - The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data.
StorageConfiguration *LongTermStorageConfigurationInput `json:"storageConfiguration,omitempty"`
+ // WarmStoreConfigurationProperties - The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's data available for faster query.
+ *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LongTermEnvironmentCreationProperties.
+func (ltecp LongTermEnvironmentCreationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ltecp.TimeSeriesIDProperties != nil {
+ objectMap["timeSeriesIdProperties"] = ltecp.TimeSeriesIDProperties
+ }
+ if ltecp.StorageConfiguration != nil {
+ objectMap["storageConfiguration"] = ltecp.StorageConfiguration
+ }
+ if ltecp.WarmStoreConfigurationProperties != nil {
+ objectMap["warmStoreConfiguration"] = ltecp.WarmStoreConfigurationProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for LongTermEnvironmentCreationProperties struct.
+func (ltecp *LongTermEnvironmentCreationProperties) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "timeSeriesIdProperties":
+ if v != nil {
+ var timeSeriesIDProperties []TimeSeriesIDProperty
+ err = json.Unmarshal(*v, &timeSeriesIDProperties)
+ if err != nil {
+ return err
+ }
+ ltecp.TimeSeriesIDProperties = &timeSeriesIDProperties
+ }
+ case "storageConfiguration":
+ if v != nil {
+ var storageConfiguration LongTermStorageConfigurationInput
+ err = json.Unmarshal(*v, &storageConfiguration)
+ if err != nil {
+ return err
+ }
+ ltecp.StorageConfiguration = &storageConfiguration
+ }
+ case "warmStoreConfiguration":
+ if v != nil {
+ var warmStoreConfigurationProperties WarmStoreConfigurationProperties
+ err = json.Unmarshal(*v, &warmStoreConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ ltecp.WarmStoreConfigurationProperties = &warmStoreConfigurationProperties
+ }
+ }
+ }
+
+ return nil
}
// LongTermEnvironmentMutableProperties an object that represents a set of mutable long-term environment
@@ -1997,8 +2077,53 @@ type LongTermEnvironmentCreationProperties struct {
type LongTermEnvironmentMutableProperties struct {
// StorageConfiguration - The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data.
StorageConfiguration *LongTermStorageConfigurationMutableProperties `json:"storageConfiguration,omitempty"`
- // TimeSeriesIDProperties - The list of event properties which will be used to partition data in the environment.
- TimeSeriesIDProperties *[]TimeSeriesIDProperty `json:"timeSeriesIdProperties,omitempty"`
+ // WarmStoreConfigurationProperties - The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's data available for faster query.
+ *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LongTermEnvironmentMutableProperties.
+func (ltemp LongTermEnvironmentMutableProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ltemp.StorageConfiguration != nil {
+ objectMap["storageConfiguration"] = ltemp.StorageConfiguration
+ }
+ if ltemp.WarmStoreConfigurationProperties != nil {
+ objectMap["warmStoreConfiguration"] = ltemp.WarmStoreConfigurationProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for LongTermEnvironmentMutableProperties struct.
+func (ltemp *LongTermEnvironmentMutableProperties) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "storageConfiguration":
+ if v != nil {
+ var storageConfiguration LongTermStorageConfigurationMutableProperties
+ err = json.Unmarshal(*v, &storageConfiguration)
+ if err != nil {
+ return err
+ }
+ ltemp.StorageConfiguration = &storageConfiguration
+ }
+ case "warmStoreConfiguration":
+ if v != nil {
+ var warmStoreConfigurationProperties WarmStoreConfigurationProperties
+ err = json.Unmarshal(*v, &warmStoreConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ ltemp.WarmStoreConfigurationProperties = &warmStoreConfigurationProperties
+ }
+ }
+ }
+
+ return nil
}
// LongTermEnvironmentResource an environment is a set of time-series data available for query, and is the
@@ -2167,6 +2292,116 @@ type LongTermEnvironmentResourceProperties struct {
TimeSeriesIDProperties *[]TimeSeriesIDProperty `json:"timeSeriesIdProperties,omitempty"`
// StorageConfiguration - The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data.
StorageConfiguration *LongTermStorageConfigurationOutput `json:"storageConfiguration,omitempty"`
+ // WarmStoreConfigurationProperties - The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's data available for faster query.
+ *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LongTermEnvironmentResourceProperties.
+func (lterp LongTermEnvironmentResourceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lterp.Status != nil {
+ objectMap["status"] = lterp.Status
+ }
+ if lterp.ProvisioningState != "" {
+ objectMap["provisioningState"] = lterp.ProvisioningState
+ }
+ if lterp.TimeSeriesIDProperties != nil {
+ objectMap["timeSeriesIdProperties"] = lterp.TimeSeriesIDProperties
+ }
+ if lterp.StorageConfiguration != nil {
+ objectMap["storageConfiguration"] = lterp.StorageConfiguration
+ }
+ if lterp.WarmStoreConfigurationProperties != nil {
+ objectMap["warmStoreConfiguration"] = lterp.WarmStoreConfigurationProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for LongTermEnvironmentResourceProperties struct.
+func (lterp *LongTermEnvironmentResourceProperties) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "dataAccessId":
+ if v != nil {
+ var dataAccessID uuid.UUID
+ err = json.Unmarshal(*v, &dataAccessID)
+ if err != nil {
+ return err
+ }
+ lterp.DataAccessID = &dataAccessID
+ }
+ case "dataAccessFqdn":
+ if v != nil {
+ var dataAccessFqdn string
+ err = json.Unmarshal(*v, &dataAccessFqdn)
+ if err != nil {
+ return err
+ }
+ lterp.DataAccessFqdn = &dataAccessFqdn
+ }
+ case "status":
+ if v != nil {
+ var status EnvironmentStatus
+ err = json.Unmarshal(*v, &status)
+ if err != nil {
+ return err
+ }
+ lterp.Status = &status
+ }
+ case "provisioningState":
+ if v != nil {
+ var provisioningState ProvisioningState
+ err = json.Unmarshal(*v, &provisioningState)
+ if err != nil {
+ return err
+ }
+ lterp.ProvisioningState = provisioningState
+ }
+ case "creationTime":
+ if v != nil {
+ var creationTime date.Time
+ err = json.Unmarshal(*v, &creationTime)
+ if err != nil {
+ return err
+ }
+ lterp.CreationTime = &creationTime
+ }
+ case "timeSeriesIdProperties":
+ if v != nil {
+ var timeSeriesIDProperties []TimeSeriesIDProperty
+ err = json.Unmarshal(*v, &timeSeriesIDProperties)
+ if err != nil {
+ return err
+ }
+ lterp.TimeSeriesIDProperties = &timeSeriesIDProperties
+ }
+ case "storageConfiguration":
+ if v != nil {
+ var storageConfiguration LongTermStorageConfigurationOutput
+ err = json.Unmarshal(*v, &storageConfiguration)
+ if err != nil {
+ return err
+ }
+ lterp.StorageConfiguration = &storageConfiguration
+ }
+ case "warmStoreConfiguration":
+ if v != nil {
+ var warmStoreConfigurationProperties WarmStoreConfigurationProperties
+ err = json.Unmarshal(*v, &warmStoreConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ lterp.WarmStoreConfigurationProperties = &warmStoreConfigurationProperties
+ }
+ }
+ }
+
+ return nil
}
// LongTermEnvironmentUpdateParameters parameters supplied to the Update Environment operation to update a
@@ -2657,7 +2892,7 @@ type ResourceProperties struct {
// standard environments the sku determines the capacity of the environment, the ingress rate, and the
// billing rate.
type Sku struct {
- // Name - The name of this SKU. Possible values include: 'S1', 'S2', 'L1'
+ // Name - The name of this SKU. Possible values include: 'S1', 'S2', 'P1', 'L1'
Name SkuName `json:"name,omitempty"`
// Capacity - The capacity of the sku. For standard environments, this value can be changed to support scale out of environments after they have been created.
Capacity *int32 `json:"capacity,omitempty"`
@@ -3071,3 +3306,111 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) {
}
return json.Marshal(objectMap)
}
+
+// WarmStorageEnvironmentStatus an object that represents the status of warm storage on an environment.
+type WarmStorageEnvironmentStatus struct {
+ // WarmStoragePropertiesUsage - An object that contains the status of warm storage properties usage.
+ *WarmStoragePropertiesUsage `json:"propertiesUsage,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for WarmStorageEnvironmentStatus.
+func (wses WarmStorageEnvironmentStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if wses.WarmStoragePropertiesUsage != nil {
+ objectMap["propertiesUsage"] = wses.WarmStoragePropertiesUsage
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for WarmStorageEnvironmentStatus struct.
+func (wses *WarmStorageEnvironmentStatus) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "propertiesUsage":
+ if v != nil {
+ var warmStoragePropertiesUsage WarmStoragePropertiesUsage
+ err = json.Unmarshal(*v, &warmStoragePropertiesUsage)
+ if err != nil {
+ return err
+ }
+ wses.WarmStoragePropertiesUsage = &warmStoragePropertiesUsage
+ }
+ }
+ }
+
+ return nil
+}
+
+// WarmStoragePropertiesUsage an object that contains the status of warm storage properties usage.
+type WarmStoragePropertiesUsage struct {
+ // State - This string represents the state of warm storage properties usage. It can be "Ok", "Error", "Unknown". Possible values include: 'WarmStoragePropertiesStateOk', 'WarmStoragePropertiesStateError', 'WarmStoragePropertiesStateUnknown'
+ State WarmStoragePropertiesState `json:"state,omitempty"`
+ // WarmStoragePropertiesUsageStateDetails - An object that contains the details about warm storage properties usage state.
+ *WarmStoragePropertiesUsageStateDetails `json:"stateDetails,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for WarmStoragePropertiesUsage.
+func (wspu WarmStoragePropertiesUsage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if wspu.State != "" {
+ objectMap["state"] = wspu.State
+ }
+ if wspu.WarmStoragePropertiesUsageStateDetails != nil {
+ objectMap["stateDetails"] = wspu.WarmStoragePropertiesUsageStateDetails
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for WarmStoragePropertiesUsage struct.
+func (wspu *WarmStoragePropertiesUsage) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "state":
+ if v != nil {
+ var state WarmStoragePropertiesState
+ err = json.Unmarshal(*v, &state)
+ if err != nil {
+ return err
+ }
+ wspu.State = state
+ }
+ case "stateDetails":
+ if v != nil {
+ var warmStoragePropertiesUsageStateDetails WarmStoragePropertiesUsageStateDetails
+ err = json.Unmarshal(*v, &warmStoragePropertiesUsageStateDetails)
+ if err != nil {
+ return err
+ }
+ wspu.WarmStoragePropertiesUsageStateDetails = &warmStoragePropertiesUsageStateDetails
+ }
+ }
+ }
+
+ return nil
+}
+
+// WarmStoragePropertiesUsageStateDetails an object that contains the details about warm storage properties
+// usage state.
+type WarmStoragePropertiesUsageStateDetails struct {
+ // CurrentCount - A value that represents the number of properties used by the environment for S1/S2 SKU and number of properties used by Warm Store for PAYG SKU
+ CurrentCount *int32 `json:"currentCount,omitempty"`
+ // MaxCount - A value that represents the maximum number of properties used allowed by the environment for S1/S2 SKU and maximum number of properties allowed by Warm Store for PAYG SKU.
+ MaxCount *int32 `json:"maxCount,omitempty"`
+}
+
+// WarmStoreConfigurationProperties the warm store configuration provides the details to create a warm
+// store cache that will retain a copy of the environment's data available for faster query.
+type WarmStoreConfigurationProperties struct {
+ // DataRetention - ISO8601 timespan specifying the number of days the environment's events will be available for query from the warm store.
+ DataRetention *string `json:"dataRetention,omitempty"`
+}
diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go
index 5c7a76f3d4d8..66a97d23eb30 100644
--- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go
+++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go
@@ -37,7 +37,7 @@ type EnvironmentsClientAPI interface {
Get(ctx context.Context, resourceGroupName string, environmentName string, expand string) (result timeseriesinsights.EnvironmentResourceModel, err error)
ListByResourceGroup(ctx context.Context, resourceGroupName string) (result timeseriesinsights.EnvironmentListResponse, err error)
ListBySubscription(ctx context.Context) (result timeseriesinsights.EnvironmentListResponse, err error)
- Update(ctx context.Context, resourceGroupName string, environmentName string, environmentUpdateParameters timeseriesinsights.EnvironmentUpdateParameters) (result timeseriesinsights.EnvironmentsUpdateFuture, err error)
+ Update(ctx context.Context, resourceGroupName string, environmentName string, standardEnvironmentUpdateParameters timeseriesinsights.StandardEnvironmentUpdateParameters) (result timeseriesinsights.EnvironmentsUpdateFuture, err error)
}
var _ EnvironmentsClientAPI = (*timeseriesinsights.EnvironmentsClient)(nil)
diff --git a/services/resources/mgmt/2019-09-01/policy/assignments.go b/services/resources/mgmt/2019-09-01/policy/assignments.go
new file mode 100644
index 000000000000..1828ec35d2a9
--- /dev/null
+++ b/services/resources/mgmt/2019-09-01/policy/assignments.go
@@ -0,0 +1,966 @@
+package policy
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// AssignmentsClient is the to manage and control access to your resources, you can define customized policies and
+// assign them at a scope.
+type AssignmentsClient struct {
+ BaseClient
+}
+
+// NewAssignmentsClient creates an instance of the AssignmentsClient client.
+func NewAssignmentsClient(subscriptionID string) AssignmentsClient {
+ return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client.
+func NewAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsClient {
+ return AssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create this operation creates or updates a policy assignment with the given scope and name. Policy assignments apply
+// to all resources contained within their scope. For example, when you assign a policy at resource group scope, that
+// policy applies to all resources in the group.
+// Parameters:
+// scope - the scope of the policy assignment. Valid scopes are: management group (format:
+// '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
+// '/subscriptions/{subscriptionId}'), resource group (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+// policyAssignmentName - the name of the policy assignment.
+// parameters - parameters for the policy assignment.
+func (client AssignmentsClient) Create(ctx context.Context, scope string, policyAssignmentName string, parameters Assignment) (result Assignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("policy.AssignmentsClient", "Create", err.Error())
+ }
+
+ req, err := client.CreatePreparer(ctx, scope, policyAssignmentName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Create", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Create", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client AssignmentsClient) CreatePreparer(ctx context.Context, scope string, policyAssignmentName string, parameters Assignment) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentName": autorest.Encode("path", policyAssignmentName),
+ "scope": scope,
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.ID = nil
+ parameters.Type = nil
+ parameters.Name = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) CreateSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) CreateResponder(resp *http.Response) (result Assignment, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateByID this operation creates or updates the policy assignment with the given ID. Policy assignments made on a
+// scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that
+// policy applies to all resources in the group. Policy assignment IDs have this format:
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management
+// group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
+// '/subscriptions/{subscriptionId}'), resource group (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+// Parameters:
+// policyAssignmentID - the ID of the policy assignment to create. Use the format
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+// parameters - parameters for policy assignment.
+func (client AssignmentsClient) CreateByID(ctx context.Context, policyAssignmentID string, parameters Assignment) (result Assignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.CreateByID")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("policy.AssignmentsClient", "CreateByID", err.Error())
+ }
+
+ req, err := client.CreateByIDPreparer(ctx, policyAssignmentID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "CreateByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateByIDSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "CreateByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "CreateByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateByIDPreparer prepares the CreateByID request.
+func (client AssignmentsClient) CreateByIDPreparer(ctx context.Context, policyAssignmentID string, parameters Assignment) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentId": policyAssignmentID,
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.ID = nil
+ parameters.Type = nil
+ parameters.Name = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{policyAssignmentId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateByIDSender sends the CreateByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) CreateByIDSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// CreateByIDResponder handles the response to the CreateByID request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) CreateByIDResponder(resp *http.Response) (result Assignment, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete this operation deletes a policy assignment, given its name and the scope it was created in. The scope of a
+// policy assignment is the part of its ID preceding
+// '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+// Parameters:
+// scope - the scope of the policy assignment. Valid scopes are: management group (format:
+// '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
+// '/subscriptions/{subscriptionId}'), resource group (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+// policyAssignmentName - the name of the policy assignment to delete.
+func (client AssignmentsClient) Delete(ctx context.Context, scope string, policyAssignmentName string) (result Assignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, scope, policyAssignmentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client AssignmentsClient) DeletePreparer(ctx context.Context, scope string, policyAssignmentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentName": autorest.Encode("path", policyAssignmentName),
+ "scope": scope,
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) DeleteResponder(resp *http.Response) (result Assignment, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteByID this operation deletes the policy with the given ID. Policy assignment IDs have this format:
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are:
+// '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group),
+// '/subscriptions/{subscriptionId}' (subscription),
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+// (resource).
+// Parameters:
+// policyAssignmentID - the ID of the policy assignment to delete. Use the format
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+func (client AssignmentsClient) DeleteByID(ctx context.Context, policyAssignmentID string) (result Assignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.DeleteByID")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeleteByIDPreparer(ctx, policyAssignmentID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "DeleteByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteByIDSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "DeleteByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "DeleteByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteByIDPreparer prepares the DeleteByID request.
+func (client AssignmentsClient) DeleteByIDPreparer(ctx context.Context, policyAssignmentID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentId": policyAssignmentID,
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{policyAssignmentId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteByIDSender sends the DeleteByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) DeleteByIDSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// DeleteByIDResponder handles the response to the DeleteByID request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) DeleteByIDResponder(resp *http.Response) (result Assignment, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get this operation retrieves a single policy assignment, given its name and the scope it was created at.
+// Parameters:
+// scope - the scope of the policy assignment. Valid scopes are: management group (format:
+// '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
+// '/subscriptions/{subscriptionId}'), resource group (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+// policyAssignmentName - the name of the policy assignment to get.
+func (client AssignmentsClient) Get(ctx context.Context, scope string, policyAssignmentName string) (result Assignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, scope, policyAssignmentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client AssignmentsClient) GetPreparer(ctx context.Context, scope string, policyAssignmentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentName": autorest.Encode("path", policyAssignmentName),
+ "scope": scope,
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) GetSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) GetResponder(resp *http.Response) (result Assignment, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetByID the operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format:
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management
+// group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
+// '/subscriptions/{subscriptionId}'), resource group (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+// Parameters:
+// policyAssignmentID - the ID of the policy assignment to get. Use the format
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+func (client AssignmentsClient) GetByID(ctx context.Context, policyAssignmentID string) (result Assignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.GetByID")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetByIDPreparer(ctx, policyAssignmentID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "GetByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetByIDSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "GetByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "GetByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetByIDPreparer prepares the GetByID request.
+func (client AssignmentsClient) GetByIDPreparer(ctx context.Context, policyAssignmentID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentId": policyAssignmentID,
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{policyAssignmentId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetByIDSender sends the GetByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) GetByIDSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetByIDResponder handles the response to the GetByID request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) GetByIDResponder(resp *http.Response) (result Assignment, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List this operation retrieves the list of all policy assignments associated with the given subscription that match
+// the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If
+// $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription,
+// including those that apply directly or from management groups that contain the given subscription, as well as any
+// applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes
+// all policy assignments that apply to the subscription, which is everything in the unfiltered list except those
+// applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the
+// returned list includes all policy assignments of the policy definition whose id is {value}.
+// Parameters:
+// filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()' or
+// 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.
+func (client AssignmentsClient) List(ctx context.Context, filter string) (result AssignmentListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.List")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client AssignmentsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) ListResponder(resp *http.Response) (result AssignmentListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client AssignmentsClient) listNextResults(ctx context.Context, lastResults AssignmentListResult) (result AssignmentListResult, err error) {
+ req, err := lastResults.assignmentListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AssignmentsClient) ListComplete(ctx context.Context, filter string) (result AssignmentListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, filter)
+ return
+}
+
+// ListForResource this operation retrieves the list of all policy assignments associated with the specified resource
+// in the given resource group and subscription that match the optional given $filter. Valid values for $filter are:
+// 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all
+// policy assignments associated with the resource, including those that apply directly or from all containing scopes,
+// as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned
+// list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except
+// those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided,
+// the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the
+// resource. Three parameters plus the resource name are used to identify a specific resource. If the resource is not
+// part of a parent resource (the more common case), the parent resource path should not be provided (or provided as
+// ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web',
+// {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a
+// parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified
+// as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine',
+// {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the
+// namespace and type name separately is to provide both in the {resourceType} parameter, format:
+// ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites',
+// {resourceName} == 'MyWebApp').
+// Parameters:
+// resourceGroupName - the name of the resource group containing the resource.
+// resourceProviderNamespace - the namespace of the resource provider. For example, the namespace of a virtual
+// machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines)
+// parentResourcePath - the parent resource path. Use empty string if there is none.
+// resourceType - the resource type name. For example the type name of a web app is 'sites' (from
+// Microsoft.Web/sites).
+// resourceName - the name of the resource.
+// filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()' or
+// 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.
+func (client AssignmentsClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result AssignmentListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.ListForResource")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("policy.AssignmentsClient", "ListForResource", err.Error())
+ }
+
+ result.fn = client.listForResourceNextResults
+ req, err := client.ListForResourcePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResource", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListForResourceSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResource", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListForResourceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResource", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListForResourcePreparer prepares the ListForResource request.
+func (client AssignmentsClient) ListForResourcePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListForResourceSender sends the ListForResource request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) ListForResourceSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListForResourceResponder handles the response to the ListForResource request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) ListForResourceResponder(resp *http.Response) (result AssignmentListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listForResourceNextResults retrieves the next set of results, if any.
+func (client AssignmentsClient) listForResourceNextResults(ctx context.Context, lastResults AssignmentListResult) (result AssignmentListResult, err error) {
+ req, err := lastResults.assignmentListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListForResourceSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListForResourceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListForResourceComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AssignmentsClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result AssignmentListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.ListForResource")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListForResource(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
+ return
+}
+
+// ListForResourceGroup this operation retrieves the list of all policy assignments associated with the given resource
+// group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or
+// 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments
+// associated with the resource group, including those that apply directly or apply from containing scopes, as well as
+// any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list
+// includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except
+// those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is
+// provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply
+// to the resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains policy assignments.
+// filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()' or
+// 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.
+func (client AssignmentsClient) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result AssignmentListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.ListForResourceGroup")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("policy.AssignmentsClient", "ListForResourceGroup", err.Error())
+ }
+
+ result.fn = client.listForResourceGroupNextResults
+ req, err := client.ListForResourceGroupPreparer(ctx, resourceGroupName, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListForResourceGroupSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListForResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListForResourceGroupPreparer prepares the ListForResourceGroup request.
+func (client AssignmentsClient) ListForResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = filter
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListForResourceGroupSender sends the ListForResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) ListForResourceGroupSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListForResourceGroupResponder handles the response to the ListForResourceGroup request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) ListForResourceGroupResponder(resp *http.Response) (result AssignmentListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listForResourceGroupNextResults retrieves the next set of results, if any.
+func (client AssignmentsClient) listForResourceGroupNextResults(ctx context.Context, lastResults AssignmentListResult) (result AssignmentListResult, err error) {
+ req, err := lastResults.assignmentListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListForResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListForResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListForResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AssignmentsClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result AssignmentListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.ListForResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListForResourceGroup(ctx, resourceGroupName, filter)
+ return
+}
diff --git a/services/resources/mgmt/2019-09-01/policy/client.go b/services/resources/mgmt/2019-09-01/policy/client.go
new file mode 100644
index 000000000000..5f51f601e186
--- /dev/null
+++ b/services/resources/mgmt/2019-09-01/policy/client.go
@@ -0,0 +1,51 @@
+// Package policy implements the Azure ARM Policy service API version 2019-09-01.
+//
+// To manage and control access to your resources, you can define customized policies and assign them at a scope.
+package policy
+
+// 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 (
+ "github.com/Azure/go-autorest/autorest"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Policy
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Policy.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/services/resources/mgmt/2019-09-01/policy/definitions.go b/services/resources/mgmt/2019-09-01/policy/definitions.go
new file mode 100644
index 000000000000..dd3b3621eaf4
--- /dev/null
+++ b/services/resources/mgmt/2019-09-01/policy/definitions.go
@@ -0,0 +1,910 @@
+package policy
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// DefinitionsClient is the to manage and control access to your resources, you can define customized policies and
+// assign them at a scope.
+type DefinitionsClient struct {
+ BaseClient
+}
+
+// NewDefinitionsClient creates an instance of the DefinitionsClient client.
+func NewDefinitionsClient(subscriptionID string) DefinitionsClient {
+ return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client.
+func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient {
+ return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate this operation creates or updates a policy definition in the given subscription with the given name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to create.
+// parameters - the policy definition properties.
+func (client DefinitionsClient) CreateOrUpdate(ctx context.Context, policyDefinitionName string, parameters Definition) (result Definition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, policyDefinitionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, policyDefinitionName string, parameters Definition) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.ID = nil
+ parameters.Name = nil
+ parameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result Definition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateOrUpdateAtManagementGroup this operation creates or updates a policy definition in the given management group
+// with the given name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to create.
+// parameters - the policy definition properties.
+// managementGroupID - the ID of the management group.
+func (client DefinitionsClient) CreateOrUpdateAtManagementGroup(ctx context.Context, policyDefinitionName string, parameters Definition, managementGroupID string) (result Definition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.CreateOrUpdateAtManagementGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdateAtManagementGroupPreparer(ctx, policyDefinitionName, parameters, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdateAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdateAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdateAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdateAtManagementGroupPreparer prepares the CreateOrUpdateAtManagementGroup request.
+func (client DefinitionsClient) CreateOrUpdateAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, parameters Definition, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.ID = nil
+ parameters.Name = nil
+ parameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateAtManagementGroupSender sends the CreateOrUpdateAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) CreateOrUpdateAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// CreateOrUpdateAtManagementGroupResponder handles the response to the CreateOrUpdateAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) CreateOrUpdateAtManagementGroupResponder(resp *http.Response) (result Definition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete this operation deletes the policy definition in the given subscription with the given name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to delete.
+func (client DefinitionsClient) Delete(ctx context.Context, policyDefinitionName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, policyDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DefinitionsClient) DeletePreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// DeleteAtManagementGroup this operation deletes the policy definition in the given management group with the given
+// name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to delete.
+// managementGroupID - the ID of the management group.
+func (client DefinitionsClient) DeleteAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.DeleteAtManagementGroup")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeleteAtManagementGroupPreparer(ctx, policyDefinitionName, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "DeleteAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "DeleteAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "DeleteAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteAtManagementGroupPreparer prepares the DeleteAtManagementGroup request.
+func (client DefinitionsClient) DeleteAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteAtManagementGroupSender sends the DeleteAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) DeleteAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// DeleteAtManagementGroupResponder handles the response to the DeleteAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) DeleteAtManagementGroupResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get this operation retrieves the policy definition in the given subscription with the given name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to get.
+func (client DefinitionsClient) Get(ctx context.Context, policyDefinitionName string) (result Definition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, policyDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DefinitionsClient) GetPreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) GetResponder(resp *http.Response) (result Definition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAtManagementGroup this operation retrieves the policy definition in the given management group with the given
+// name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to get.
+// managementGroupID - the ID of the management group.
+func (client DefinitionsClient) GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result Definition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.GetAtManagementGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetAtManagementGroupPreparer(ctx, policyDefinitionName, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetAtManagementGroupPreparer prepares the GetAtManagementGroup request.
+func (client DefinitionsClient) GetAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAtManagementGroupSender sends the GetAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) GetAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetAtManagementGroupResponder handles the response to the GetAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) GetAtManagementGroupResponder(resp *http.Response) (result Definition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetBuiltIn this operation retrieves the built-in policy definition with the given name.
+// Parameters:
+// policyDefinitionName - the name of the built-in policy definition to get.
+func (client DefinitionsClient) GetBuiltIn(ctx context.Context, policyDefinitionName string) (result Definition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.GetBuiltIn")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetBuiltInPreparer(ctx, policyDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetBuiltIn", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetBuiltInSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetBuiltIn", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetBuiltIn", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetBuiltInPreparer prepares the GetBuiltIn request.
+func (client DefinitionsClient) GetBuiltInPreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetBuiltInSender sends the GetBuiltIn request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) GetBuiltInSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetBuiltInResponder handles the response to the GetBuiltIn request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) GetBuiltInResponder(resp *http.Response) (result Definition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List this operation retrieves a list of all the policy definitions in a given subscription.
+func (client DefinitionsClient) List(ctx context.Context) (result DefinitionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.List")
+ defer func() {
+ sc := -1
+ if result.dlr.Response.Response != nil {
+ sc = result.dlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.dlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.dlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client DefinitionsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) ListResponder(resp *http.Response) (result DefinitionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client DefinitionsClient) listNextResults(ctx context.Context, lastResults DefinitionListResult) (result DefinitionListResult, err error) {
+ req, err := lastResults.definitionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DefinitionsClient) ListComplete(ctx context.Context) (result DefinitionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListBuiltIn this operation retrieves a list of all the built-in policy definitions.
+func (client DefinitionsClient) ListBuiltIn(ctx context.Context) (result DefinitionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.ListBuiltIn")
+ defer func() {
+ sc := -1
+ if result.dlr.Response.Response != nil {
+ sc = result.dlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listBuiltInNextResults
+ req, err := client.ListBuiltInPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListBuiltIn", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBuiltInSender(req)
+ if err != nil {
+ result.dlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListBuiltIn", resp, "Failure sending request")
+ return
+ }
+
+ result.dlr, err = client.ListBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListBuiltIn", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBuiltInPreparer prepares the ListBuiltIn request.
+func (client DefinitionsClient) ListBuiltInPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Authorization/policyDefinitions"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBuiltInSender sends the ListBuiltIn request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) ListBuiltInSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListBuiltInResponder handles the response to the ListBuiltIn request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) ListBuiltInResponder(resp *http.Response) (result DefinitionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBuiltInNextResults retrieves the next set of results, if any.
+func (client DefinitionsClient) listBuiltInNextResults(ctx context.Context, lastResults DefinitionListResult) (result DefinitionListResult, err error) {
+ req, err := lastResults.definitionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listBuiltInNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBuiltInSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listBuiltInNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listBuiltInNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBuiltInComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DefinitionsClient) ListBuiltInComplete(ctx context.Context) (result DefinitionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.ListBuiltIn")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBuiltIn(ctx)
+ return
+}
+
+// ListByManagementGroup this operation retrieves a list of all the policy definitions in a given management group.
+// Parameters:
+// managementGroupID - the ID of the management group.
+func (client DefinitionsClient) ListByManagementGroup(ctx context.Context, managementGroupID string) (result DefinitionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.ListByManagementGroup")
+ defer func() {
+ sc := -1
+ if result.dlr.Response.Response != nil {
+ sc = result.dlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByManagementGroupNextResults
+ req, err := client.ListByManagementGroupPreparer(ctx, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListByManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByManagementGroupSender(req)
+ if err != nil {
+ result.dlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListByManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.dlr, err = client.ListByManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListByManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByManagementGroupPreparer prepares the ListByManagementGroup request.
+func (client DefinitionsClient) ListByManagementGroupPreparer(ctx context.Context, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByManagementGroupSender sends the ListByManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) ListByManagementGroupSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListByManagementGroupResponder handles the response to the ListByManagementGroup request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) ListByManagementGroupResponder(resp *http.Response) (result DefinitionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByManagementGroupNextResults retrieves the next set of results, if any.
+func (client DefinitionsClient) listByManagementGroupNextResults(ctx context.Context, lastResults DefinitionListResult) (result DefinitionListResult, err error) {
+ req, err := lastResults.definitionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listByManagementGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listByManagementGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listByManagementGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByManagementGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DefinitionsClient) ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result DefinitionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionsClient.ListByManagementGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByManagementGroup(ctx, managementGroupID)
+ return
+}
diff --git a/services/resources/mgmt/2019-09-01/policy/models.go b/services/resources/mgmt/2019-09-01/policy/models.go
new file mode 100644
index 000000000000..814e5645f18b
--- /dev/null
+++ b/services/resources/mgmt/2019-09-01/policy/models.go
@@ -0,0 +1,1120 @@
+package policy
+
+// 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"
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-09-01/policy"
+
+// EnforcementMode enumerates the values for enforcement mode.
+type EnforcementMode string
+
+const (
+ // Default The policy effect is enforced during resource creation or update.
+ Default EnforcementMode = "Default"
+ // DoNotEnforce The policy effect is not enforced during resource creation or update.
+ DoNotEnforce EnforcementMode = "DoNotEnforce"
+)
+
+// PossibleEnforcementModeValues returns an array of possible values for the EnforcementMode const type.
+func PossibleEnforcementModeValues() []EnforcementMode {
+ return []EnforcementMode{Default, DoNotEnforce}
+}
+
+// ParameterType enumerates the values for parameter type.
+type ParameterType string
+
+const (
+ // Array ...
+ Array ParameterType = "Array"
+ // Boolean ...
+ Boolean ParameterType = "Boolean"
+ // DateTime ...
+ DateTime ParameterType = "DateTime"
+ // Float ...
+ Float ParameterType = "Float"
+ // Integer ...
+ Integer ParameterType = "Integer"
+ // Object ...
+ Object ParameterType = "Object"
+ // String ...
+ String ParameterType = "String"
+)
+
+// PossibleParameterTypeValues returns an array of possible values for the ParameterType const type.
+func PossibleParameterTypeValues() []ParameterType {
+ return []ParameterType{Array, Boolean, DateTime, Float, Integer, Object, String}
+}
+
+// ResourceIdentityType enumerates the values for resource identity type.
+type ResourceIdentityType string
+
+const (
+ // None ...
+ None ResourceIdentityType = "None"
+ // SystemAssigned ...
+ SystemAssigned ResourceIdentityType = "SystemAssigned"
+)
+
+// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return []ResourceIdentityType{None, SystemAssigned}
+}
+
+// Type enumerates the values for type.
+type Type string
+
+const (
+ // BuiltIn ...
+ BuiltIn Type = "BuiltIn"
+ // Custom ...
+ Custom Type = "Custom"
+ // NotSpecified ...
+ NotSpecified Type = "NotSpecified"
+ // Static ...
+ Static Type = "Static"
+)
+
+// PossibleTypeValues returns an array of possible values for the Type const type.
+func PossibleTypeValues() []Type {
+ return []Type{BuiltIn, Custom, NotSpecified, Static}
+}
+
+// Assignment the policy assignment.
+type Assignment struct {
+ autorest.Response `json:"-"`
+ // AssignmentProperties - Properties for the policy assignment.
+ *AssignmentProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; The ID of the policy assignment.
+ ID *string `json:"id,omitempty"`
+ // Type - READ-ONLY; The type of the policy assignment.
+ Type *string `json:"type,omitempty"`
+ // Name - READ-ONLY; The name of the policy assignment.
+ Name *string `json:"name,omitempty"`
+ // Sku - The policy sku. This property is optional, obsolete, and will be ignored.
+ Sku *Sku `json:"sku,omitempty"`
+ // Location - The location of the policy assignment. Only required when utilizing managed identity.
+ Location *string `json:"location,omitempty"`
+ // Identity - The managed identity associated with the policy assignment.
+ Identity *Identity `json:"identity,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Assignment.
+func (a Assignment) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if a.AssignmentProperties != nil {
+ objectMap["properties"] = a.AssignmentProperties
+ }
+ if a.Sku != nil {
+ objectMap["sku"] = a.Sku
+ }
+ if a.Location != nil {
+ objectMap["location"] = a.Location
+ }
+ if a.Identity != nil {
+ objectMap["identity"] = a.Identity
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Assignment struct.
+func (a *Assignment) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var assignmentProperties AssignmentProperties
+ err = json.Unmarshal(*v, &assignmentProperties)
+ if err != nil {
+ return err
+ }
+ a.AssignmentProperties = &assignmentProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ a.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ a.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ a.Name = &name
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ a.Sku = &sku
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ a.Location = &location
+ }
+ case "identity":
+ if v != nil {
+ var identity Identity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ a.Identity = &identity
+ }
+ }
+ }
+
+ return nil
+}
+
+// AssignmentListResult list of policy assignments.
+type AssignmentListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of policy assignments.
+ Value *[]Assignment `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// AssignmentListResultIterator provides access to a complete listing of Assignment values.
+type AssignmentListResultIterator struct {
+ i int
+ page AssignmentListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AssignmentListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AssignmentListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AssignmentListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AssignmentListResultIterator) Response() AssignmentListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AssignmentListResultIterator) Value() Assignment {
+ if !iter.page.NotDone() {
+ return Assignment{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the AssignmentListResultIterator type.
+func NewAssignmentListResultIterator(page AssignmentListResultPage) AssignmentListResultIterator {
+ return AssignmentListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (alr AssignmentListResult) IsEmpty() bool {
+ return alr.Value == nil || len(*alr.Value) == 0
+}
+
+// assignmentListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (alr AssignmentListResult) assignmentListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(alr.NextLink)))
+}
+
+// AssignmentListResultPage contains a page of Assignment values.
+type AssignmentListResultPage struct {
+ fn func(context.Context, AssignmentListResult) (AssignmentListResult, error)
+ alr AssignmentListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *AssignmentListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.alr)
+ if err != nil {
+ return err
+ }
+ page.alr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AssignmentListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AssignmentListResultPage) NotDone() bool {
+ return !page.alr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AssignmentListResultPage) Response() AssignmentListResult {
+ return page.alr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AssignmentListResultPage) Values() []Assignment {
+ if page.alr.IsEmpty() {
+ return nil
+ }
+ return *page.alr.Value
+}
+
+// Creates a new instance of the AssignmentListResultPage type.
+func NewAssignmentListResultPage(getNextPage func(context.Context, AssignmentListResult) (AssignmentListResult, error)) AssignmentListResultPage {
+ return AssignmentListResultPage{fn: getNextPage}
+}
+
+// AssignmentProperties the policy assignment properties.
+type AssignmentProperties struct {
+ // DisplayName - The display name of the policy assignment.
+ DisplayName *string `json:"displayName,omitempty"`
+ // PolicyDefinitionID - The ID of the policy definition or policy set definition being assigned.
+ PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"`
+ // Scope - The scope for the policy assignment.
+ Scope *string `json:"scope,omitempty"`
+ // NotScopes - The policy's excluded scopes.
+ NotScopes *[]string `json:"notScopes,omitempty"`
+ // Parameters - The parameter values for the assigned policy rule. The keys are the parameter names.
+ Parameters map[string]*ParameterValuesValue `json:"parameters"`
+ // Description - This message will be part of response in case of policy violation.
+ Description *string `json:"description,omitempty"`
+ // Metadata - The policy assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs.
+ Metadata interface{} `json:"metadata,omitempty"`
+ // EnforcementMode - The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. Possible values include: 'Default', 'DoNotEnforce'
+ EnforcementMode EnforcementMode `json:"enforcementMode,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AssignmentProperties.
+func (ap AssignmentProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ap.DisplayName != nil {
+ objectMap["displayName"] = ap.DisplayName
+ }
+ if ap.PolicyDefinitionID != nil {
+ objectMap["policyDefinitionId"] = ap.PolicyDefinitionID
+ }
+ if ap.Scope != nil {
+ objectMap["scope"] = ap.Scope
+ }
+ if ap.NotScopes != nil {
+ objectMap["notScopes"] = ap.NotScopes
+ }
+ if ap.Parameters != nil {
+ objectMap["parameters"] = ap.Parameters
+ }
+ if ap.Description != nil {
+ objectMap["description"] = ap.Description
+ }
+ if ap.Metadata != nil {
+ objectMap["metadata"] = ap.Metadata
+ }
+ if ap.EnforcementMode != "" {
+ objectMap["enforcementMode"] = ap.EnforcementMode
+ }
+ return json.Marshal(objectMap)
+}
+
+// CloudError an error response from a policy operation.
+type CloudError struct {
+ Error *ErrorResponse `json:"error,omitempty"`
+}
+
+// Definition the policy definition.
+type Definition struct {
+ autorest.Response `json:"-"`
+ // DefinitionProperties - The policy definition properties.
+ *DefinitionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; The ID of the policy definition.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the policy definition.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the resource (Microsoft.Authorization/policyDefinitions).
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Definition.
+func (d Definition) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if d.DefinitionProperties != nil {
+ objectMap["properties"] = d.DefinitionProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Definition struct.
+func (d *Definition) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var definitionProperties DefinitionProperties
+ err = json.Unmarshal(*v, &definitionProperties)
+ if err != nil {
+ return err
+ }
+ d.DefinitionProperties = &definitionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ d.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ d.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ d.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// DefinitionGroup the policy definition group.
+type DefinitionGroup struct {
+ // Name - The name of the group.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The group's display name.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Category - The group's category.
+ Category *string `json:"category,omitempty"`
+ // Description - The group's description.
+ Description *string `json:"description,omitempty"`
+ // AdditionalMetadataID - A resource ID of a resource that contains additional metadata about the group.
+ AdditionalMetadataID *string `json:"additionalMetadataId,omitempty"`
+}
+
+// DefinitionListResult list of policy definitions.
+type DefinitionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of policy definitions.
+ Value *[]Definition `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DefinitionListResultIterator provides access to a complete listing of Definition values.
+type DefinitionListResultIterator struct {
+ i int
+ page DefinitionListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DefinitionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DefinitionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DefinitionListResultIterator) Response() DefinitionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DefinitionListResultIterator) Value() Definition {
+ if !iter.page.NotDone() {
+ return Definition{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DefinitionListResultIterator type.
+func NewDefinitionListResultIterator(page DefinitionListResultPage) DefinitionListResultIterator {
+ return DefinitionListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dlr DefinitionListResult) IsEmpty() bool {
+ return dlr.Value == nil || len(*dlr.Value) == 0
+}
+
+// definitionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dlr DefinitionListResult) definitionListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if dlr.NextLink == nil || len(to.String(dlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dlr.NextLink)))
+}
+
+// DefinitionListResultPage contains a page of Definition values.
+type DefinitionListResultPage struct {
+ fn func(context.Context, DefinitionListResult) (DefinitionListResult, error)
+ dlr DefinitionListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefinitionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dlr)
+ if err != nil {
+ return err
+ }
+ page.dlr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DefinitionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DefinitionListResultPage) NotDone() bool {
+ return !page.dlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DefinitionListResultPage) Response() DefinitionListResult {
+ return page.dlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DefinitionListResultPage) Values() []Definition {
+ if page.dlr.IsEmpty() {
+ return nil
+ }
+ return *page.dlr.Value
+}
+
+// Creates a new instance of the DefinitionListResultPage type.
+func NewDefinitionListResultPage(getNextPage func(context.Context, DefinitionListResult) (DefinitionListResult, error)) DefinitionListResultPage {
+ return DefinitionListResultPage{fn: getNextPage}
+}
+
+// DefinitionProperties the policy definition properties.
+type DefinitionProperties struct {
+ // PolicyType - The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom', 'Static'
+ PolicyType Type `json:"policyType,omitempty"`
+ // Mode - The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
+ Mode *string `json:"mode,omitempty"`
+ // DisplayName - The display name of the policy definition.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Description - The policy definition description.
+ Description *string `json:"description,omitempty"`
+ // PolicyRule - The policy rule.
+ PolicyRule interface{} `json:"policyRule,omitempty"`
+ // Metadata - The policy definition metadata. Metadata is an open ended object and is typically a collection of key value pairs.
+ Metadata interface{} `json:"metadata,omitempty"`
+ // Parameters - The parameter definitions for parameters used in the policy rule. The keys are the parameter names.
+ Parameters map[string]*ParameterDefinitionsValue `json:"parameters"`
+}
+
+// MarshalJSON is the custom marshaler for DefinitionProperties.
+func (dp DefinitionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dp.PolicyType != "" {
+ objectMap["policyType"] = dp.PolicyType
+ }
+ if dp.Mode != nil {
+ objectMap["mode"] = dp.Mode
+ }
+ if dp.DisplayName != nil {
+ objectMap["displayName"] = dp.DisplayName
+ }
+ if dp.Description != nil {
+ objectMap["description"] = dp.Description
+ }
+ if dp.PolicyRule != nil {
+ objectMap["policyRule"] = dp.PolicyRule
+ }
+ if dp.Metadata != nil {
+ objectMap["metadata"] = dp.Metadata
+ }
+ if dp.Parameters != nil {
+ objectMap["parameters"] = dp.Parameters
+ }
+ return json.Marshal(objectMap)
+}
+
+// DefinitionReference the policy definition reference.
+type DefinitionReference struct {
+ // PolicyDefinitionID - The ID of the policy definition or policy set definition.
+ PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"`
+ // Parameters - The parameter values for the referenced policy rule. The keys are the parameter names.
+ Parameters map[string]*ParameterValuesValue `json:"parameters"`
+ // PolicyDefinitionReferenceID - A unique id (within the policy set definition) for this policy definition reference.
+ PolicyDefinitionReferenceID *string `json:"policyDefinitionReferenceId,omitempty"`
+ // GroupNames - The name of the groups that this policy definition reference belongs to.
+ GroupNames *[]string `json:"groupNames,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DefinitionReference.
+func (dr DefinitionReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dr.PolicyDefinitionID != nil {
+ objectMap["policyDefinitionId"] = dr.PolicyDefinitionID
+ }
+ if dr.Parameters != nil {
+ objectMap["parameters"] = dr.Parameters
+ }
+ if dr.PolicyDefinitionReferenceID != nil {
+ objectMap["policyDefinitionReferenceId"] = dr.PolicyDefinitionReferenceID
+ }
+ if dr.GroupNames != nil {
+ objectMap["groupNames"] = dr.GroupNames
+ }
+ return json.Marshal(objectMap)
+}
+
+// ErrorAdditionalInfo the resource management error additional info.
+type ErrorAdditionalInfo struct {
+ // Type - READ-ONLY; The additional info type.
+ Type *string `json:"type,omitempty"`
+ // Info - READ-ONLY; The additional info.
+ Info interface{} `json:"info,omitempty"`
+}
+
+// ErrorResponse the resource management error response.
+type ErrorResponse struct {
+ // Code - READ-ONLY; The error code.
+ Code *string `json:"code,omitempty"`
+ // Message - READ-ONLY; The error message.
+ Message *string `json:"message,omitempty"`
+ // Target - READ-ONLY; The error target.
+ Target *string `json:"target,omitempty"`
+ // Details - READ-ONLY; The error details.
+ Details *[]ErrorResponse `json:"details,omitempty"`
+ // AdditionalInfo - READ-ONLY; The error additional info.
+ AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
+}
+
+// Identity identity for the resource.
+type Identity struct {
+ // PrincipalID - READ-ONLY; The principal ID of the resource identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant ID of the resource identity.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The identity type. Possible values include: 'SystemAssigned', 'None'
+ Type ResourceIdentityType `json:"type,omitempty"`
+}
+
+// ParameterDefinitionsValue ...
+type ParameterDefinitionsValue struct {
+ // Type - The data type of the parameter. Possible values include: 'String', 'Array', 'Object', 'Boolean', 'Integer', 'Float', 'DateTime'
+ Type ParameterType `json:"type,omitempty"`
+ // AllowedValues - The allowed values for the parameter.
+ AllowedValues *[]interface{} `json:"allowedValues,omitempty"`
+ // DefaultValue - The default value for the parameter if no value is provided.
+ DefaultValue interface{} `json:"defaultValue,omitempty"`
+ // Metadata - General metadata for the parameter.
+ Metadata *ParameterDefinitionsValueMetadata `json:"metadata,omitempty"`
+}
+
+// ParameterDefinitionsValueMetadata general metadata for the parameter.
+type ParameterDefinitionsValueMetadata struct {
+ // AdditionalProperties - Unmatched properties from the message are deserialized this collection
+ AdditionalProperties map[string]interface{} `json:""`
+ // DisplayName - The display name for the parameter.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Description - The description of the parameter.
+ Description *string `json:"description,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ParameterDefinitionsValueMetadata.
+func (pdv ParameterDefinitionsValueMetadata) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pdv.DisplayName != nil {
+ objectMap["displayName"] = pdv.DisplayName
+ }
+ if pdv.Description != nil {
+ objectMap["description"] = pdv.Description
+ }
+ for k, v := range pdv.AdditionalProperties {
+ objectMap[k] = v
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ParameterDefinitionsValueMetadata struct.
+func (pdv *ParameterDefinitionsValueMetadata) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ default:
+ if v != nil {
+ var additionalProperties interface{}
+ err = json.Unmarshal(*v, &additionalProperties)
+ if err != nil {
+ return err
+ }
+ if pdv.AdditionalProperties == nil {
+ pdv.AdditionalProperties = make(map[string]interface{})
+ }
+ pdv.AdditionalProperties[k] = additionalProperties
+ }
+ case "displayName":
+ if v != nil {
+ var displayName string
+ err = json.Unmarshal(*v, &displayName)
+ if err != nil {
+ return err
+ }
+ pdv.DisplayName = &displayName
+ }
+ case "description":
+ if v != nil {
+ var description string
+ err = json.Unmarshal(*v, &description)
+ if err != nil {
+ return err
+ }
+ pdv.Description = &description
+ }
+ }
+ }
+
+ return nil
+}
+
+// ParameterValuesValue ...
+type ParameterValuesValue struct {
+ // Value - The value of the parameter.
+ Value interface{} `json:"value,omitempty"`
+}
+
+// SetDefinition the policy set definition.
+type SetDefinition struct {
+ autorest.Response `json:"-"`
+ // SetDefinitionProperties - The policy definition properties.
+ *SetDefinitionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; The ID of the policy set definition.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the policy set definition.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the resource (Microsoft.Authorization/policySetDefinitions).
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SetDefinition.
+func (sd SetDefinition) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sd.SetDefinitionProperties != nil {
+ objectMap["properties"] = sd.SetDefinitionProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SetDefinition struct.
+func (sd *SetDefinition) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var setDefinitionProperties SetDefinitionProperties
+ err = json.Unmarshal(*v, &setDefinitionProperties)
+ if err != nil {
+ return err
+ }
+ sd.SetDefinitionProperties = &setDefinitionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ sd.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ sd.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ sd.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// SetDefinitionListResult list of policy set definitions.
+type SetDefinitionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of policy set definitions.
+ Value *[]SetDefinition `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SetDefinitionListResultIterator provides access to a complete listing of SetDefinition values.
+type SetDefinitionListResultIterator struct {
+ i int
+ page SetDefinitionListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SetDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SetDefinitionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SetDefinitionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SetDefinitionListResultIterator) Response() SetDefinitionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SetDefinitionListResultIterator) Value() SetDefinition {
+ if !iter.page.NotDone() {
+ return SetDefinition{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SetDefinitionListResultIterator type.
+func NewSetDefinitionListResultIterator(page SetDefinitionListResultPage) SetDefinitionListResultIterator {
+ return SetDefinitionListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (sdlr SetDefinitionListResult) IsEmpty() bool {
+ return sdlr.Value == nil || len(*sdlr.Value) == 0
+}
+
+// setDefinitionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (sdlr SetDefinitionListResult) setDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if sdlr.NextLink == nil || len(to.String(sdlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(sdlr.NextLink)))
+}
+
+// SetDefinitionListResultPage contains a page of SetDefinition values.
+type SetDefinitionListResultPage struct {
+ fn func(context.Context, SetDefinitionListResult) (SetDefinitionListResult, error)
+ sdlr SetDefinitionListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SetDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.sdlr)
+ if err != nil {
+ return err
+ }
+ page.sdlr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SetDefinitionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SetDefinitionListResultPage) NotDone() bool {
+ return !page.sdlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SetDefinitionListResultPage) Response() SetDefinitionListResult {
+ return page.sdlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SetDefinitionListResultPage) Values() []SetDefinition {
+ if page.sdlr.IsEmpty() {
+ return nil
+ }
+ return *page.sdlr.Value
+}
+
+// Creates a new instance of the SetDefinitionListResultPage type.
+func NewSetDefinitionListResultPage(getNextPage func(context.Context, SetDefinitionListResult) (SetDefinitionListResult, error)) SetDefinitionListResultPage {
+ return SetDefinitionListResultPage{fn: getNextPage}
+}
+
+// SetDefinitionProperties the policy set definition properties.
+type SetDefinitionProperties struct {
+ // PolicyType - The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom', 'Static'
+ PolicyType Type `json:"policyType,omitempty"`
+ // DisplayName - The display name of the policy set definition.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Description - The policy set definition description.
+ Description *string `json:"description,omitempty"`
+ // Metadata - The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs.
+ Metadata interface{} `json:"metadata,omitempty"`
+ // Parameters - The policy set definition parameters that can be used in policy definition references.
+ Parameters map[string]*ParameterDefinitionsValue `json:"parameters"`
+ // PolicyDefinitions - An array of policy definition references.
+ PolicyDefinitions *[]DefinitionReference `json:"policyDefinitions,omitempty"`
+ // PolicyDefinitionGroups - The metadata describing groups of policy definition references within the policy set definition.
+ PolicyDefinitionGroups *[]DefinitionGroup `json:"policyDefinitionGroups,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SetDefinitionProperties.
+func (sdp SetDefinitionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sdp.PolicyType != "" {
+ objectMap["policyType"] = sdp.PolicyType
+ }
+ if sdp.DisplayName != nil {
+ objectMap["displayName"] = sdp.DisplayName
+ }
+ if sdp.Description != nil {
+ objectMap["description"] = sdp.Description
+ }
+ if sdp.Metadata != nil {
+ objectMap["metadata"] = sdp.Metadata
+ }
+ if sdp.Parameters != nil {
+ objectMap["parameters"] = sdp.Parameters
+ }
+ if sdp.PolicyDefinitions != nil {
+ objectMap["policyDefinitions"] = sdp.PolicyDefinitions
+ }
+ if sdp.PolicyDefinitionGroups != nil {
+ objectMap["policyDefinitionGroups"] = sdp.PolicyDefinitionGroups
+ }
+ return json.Marshal(objectMap)
+}
+
+// Sku the policy sku. This property is optional, obsolete, and will be ignored.
+type Sku struct {
+ // Name - The name of the policy sku. Possible values are A0 and A1.
+ Name *string `json:"name,omitempty"`
+ // Tier - The policy sku tier. Possible values are Free and Standard.
+ Tier *string `json:"tier,omitempty"`
+}
diff --git a/services/resources/mgmt/2019-09-01/policy/policyapi/interfaces.go b/services/resources/mgmt/2019-09-01/policy/policyapi/interfaces.go
new file mode 100644
index 000000000000..c4c6e9309bd6
--- /dev/null
+++ b/services/resources/mgmt/2019-09-01/policy/policyapi/interfaces.go
@@ -0,0 +1,71 @@
+package policyapi
+
+// 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/resources/mgmt/2019-09-01/policy"
+ "github.com/Azure/go-autorest/autorest"
+)
+
+// AssignmentsClientAPI contains the set of methods on the AssignmentsClient type.
+type AssignmentsClientAPI interface {
+ Create(ctx context.Context, scope string, policyAssignmentName string, parameters policy.Assignment) (result policy.Assignment, err error)
+ CreateByID(ctx context.Context, policyAssignmentID string, parameters policy.Assignment) (result policy.Assignment, err error)
+ Delete(ctx context.Context, scope string, policyAssignmentName string) (result policy.Assignment, err error)
+ DeleteByID(ctx context.Context, policyAssignmentID string) (result policy.Assignment, err error)
+ Get(ctx context.Context, scope string, policyAssignmentName string) (result policy.Assignment, err error)
+ GetByID(ctx context.Context, policyAssignmentID string) (result policy.Assignment, err error)
+ List(ctx context.Context, filter string) (result policy.AssignmentListResultPage, err error)
+ ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultPage, err error)
+ ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultPage, err error)
+}
+
+var _ AssignmentsClientAPI = (*policy.AssignmentsClient)(nil)
+
+// DefinitionsClientAPI contains the set of methods on the DefinitionsClient type.
+type DefinitionsClientAPI interface {
+ CreateOrUpdate(ctx context.Context, policyDefinitionName string, parameters policy.Definition) (result policy.Definition, err error)
+ CreateOrUpdateAtManagementGroup(ctx context.Context, policyDefinitionName string, parameters policy.Definition, managementGroupID string) (result policy.Definition, err error)
+ Delete(ctx context.Context, policyDefinitionName string) (result autorest.Response, err error)
+ DeleteAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result autorest.Response, err error)
+ Get(ctx context.Context, policyDefinitionName string) (result policy.Definition, err error)
+ GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result policy.Definition, err error)
+ GetBuiltIn(ctx context.Context, policyDefinitionName string) (result policy.Definition, err error)
+ List(ctx context.Context) (result policy.DefinitionListResultPage, err error)
+ ListBuiltIn(ctx context.Context) (result policy.DefinitionListResultPage, err error)
+ ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultPage, err error)
+}
+
+var _ DefinitionsClientAPI = (*policy.DefinitionsClient)(nil)
+
+// SetDefinitionsClientAPI contains the set of methods on the SetDefinitionsClient type.
+type SetDefinitionsClientAPI interface {
+ CreateOrUpdate(ctx context.Context, policySetDefinitionName string, parameters policy.SetDefinition) (result policy.SetDefinition, err error)
+ CreateOrUpdateAtManagementGroup(ctx context.Context, policySetDefinitionName string, parameters policy.SetDefinition, managementGroupID string) (result policy.SetDefinition, err error)
+ Delete(ctx context.Context, policySetDefinitionName string) (result autorest.Response, err error)
+ DeleteAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result autorest.Response, err error)
+ Get(ctx context.Context, policySetDefinitionName string) (result policy.SetDefinition, err error)
+ GetAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result policy.SetDefinition, err error)
+ GetBuiltIn(ctx context.Context, policySetDefinitionName string) (result policy.SetDefinition, err error)
+ List(ctx context.Context) (result policy.SetDefinitionListResultPage, err error)
+ ListBuiltIn(ctx context.Context) (result policy.SetDefinitionListResultPage, err error)
+ ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultPage, err error)
+}
+
+var _ SetDefinitionsClientAPI = (*policy.SetDefinitionsClient)(nil)
diff --git a/services/resources/mgmt/2019-09-01/policy/setdefinitions.go b/services/resources/mgmt/2019-09-01/policy/setdefinitions.go
new file mode 100644
index 000000000000..34a78b50a3f5
--- /dev/null
+++ b/services/resources/mgmt/2019-09-01/policy/setdefinitions.go
@@ -0,0 +1,927 @@
+package policy
+
+// 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/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// SetDefinitionsClient is the to manage and control access to your resources, you can define customized policies and
+// assign them at a scope.
+type SetDefinitionsClient struct {
+ BaseClient
+}
+
+// NewSetDefinitionsClient creates an instance of the SetDefinitionsClient client.
+func NewSetDefinitionsClient(subscriptionID string) SetDefinitionsClient {
+ return NewSetDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client.
+func NewSetDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) SetDefinitionsClient {
+ return SetDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate this operation creates or updates a policy set definition in the given subscription with the given
+// name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to create.
+// parameters - the policy set definition properties.
+func (client SetDefinitionsClient) CreateOrUpdate(ctx context.Context, policySetDefinitionName string, parameters SetDefinition) (result SetDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.SetDefinitionProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.SetDefinitionProperties.PolicyDefinitions", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("policy.SetDefinitionsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, policySetDefinitionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client SetDefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, policySetDefinitionName string, parameters SetDefinition) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.ID = nil
+ parameters.Name = nil
+ parameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result SetDefinition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateOrUpdateAtManagementGroup this operation creates or updates a policy set definition in the given management
+// group with the given name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to create.
+// parameters - the policy set definition properties.
+// managementGroupID - the ID of the management group.
+func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroup(ctx context.Context, policySetDefinitionName string, parameters SetDefinition, managementGroupID string) (result SetDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.CreateOrUpdateAtManagementGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.SetDefinitionProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.SetDefinitionProperties.PolicyDefinitions", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("policy.SetDefinitionsClient", "CreateOrUpdateAtManagementGroup", err.Error())
+ }
+
+ req, err := client.CreateOrUpdateAtManagementGroupPreparer(ctx, policySetDefinitionName, parameters, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdateAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdateAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdateAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdateAtManagementGroupPreparer prepares the CreateOrUpdateAtManagementGroup request.
+func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, parameters SetDefinition, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.ID = nil
+ parameters.Name = nil
+ parameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateAtManagementGroupSender sends the CreateOrUpdateAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// CreateOrUpdateAtManagementGroupResponder handles the response to the CreateOrUpdateAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupResponder(resp *http.Response) (result SetDefinition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete this operation deletes the policy set definition in the given subscription with the given name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to delete.
+func (client SetDefinitionsClient) Delete(ctx context.Context, policySetDefinitionName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, policySetDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SetDefinitionsClient) DeletePreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// DeleteAtManagementGroup this operation deletes the policy set definition in the given management group with the
+// given name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to delete.
+// managementGroupID - the ID of the management group.
+func (client SetDefinitionsClient) DeleteAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.DeleteAtManagementGroup")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeleteAtManagementGroupPreparer(ctx, policySetDefinitionName, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "DeleteAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "DeleteAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "DeleteAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteAtManagementGroupPreparer prepares the DeleteAtManagementGroup request.
+func (client SetDefinitionsClient) DeleteAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteAtManagementGroupSender sends the DeleteAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) DeleteAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// DeleteAtManagementGroupResponder handles the response to the DeleteAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) DeleteAtManagementGroupResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get this operation retrieves the policy set definition in the given subscription with the given name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to get.
+func (client SetDefinitionsClient) Get(ctx context.Context, policySetDefinitionName string) (result SetDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, policySetDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SetDefinitionsClient) GetPreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) GetResponder(resp *http.Response) (result SetDefinition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAtManagementGroup this operation retrieves the policy set definition in the given management group with the given
+// name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to get.
+// managementGroupID - the ID of the management group.
+func (client SetDefinitionsClient) GetAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result SetDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.GetAtManagementGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetAtManagementGroupPreparer(ctx, policySetDefinitionName, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetAtManagementGroupPreparer prepares the GetAtManagementGroup request.
+func (client SetDefinitionsClient) GetAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAtManagementGroupSender sends the GetAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) GetAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetAtManagementGroupResponder handles the response to the GetAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) GetAtManagementGroupResponder(resp *http.Response) (result SetDefinition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetBuiltIn this operation retrieves the built-in policy set definition with the given name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to get.
+func (client SetDefinitionsClient) GetBuiltIn(ctx context.Context, policySetDefinitionName string) (result SetDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.GetBuiltIn")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetBuiltInPreparer(ctx, policySetDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetBuiltIn", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetBuiltInSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetBuiltIn", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetBuiltIn", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetBuiltInPreparer prepares the GetBuiltIn request.
+func (client SetDefinitionsClient) GetBuiltInPreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetBuiltInSender sends the GetBuiltIn request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) GetBuiltInSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetBuiltInResponder handles the response to the GetBuiltIn request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) GetBuiltInResponder(resp *http.Response) (result SetDefinition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List this operation retrieves a list of all the policy set definitions in the given subscription.
+func (client SetDefinitionsClient) List(ctx context.Context) (result SetDefinitionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.List")
+ defer func() {
+ sc := -1
+ if result.sdlr.Response.Response != nil {
+ sc = result.sdlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.sdlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.sdlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SetDefinitionsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) ListResponder(resp *http.Response) (result SetDefinitionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client SetDefinitionsClient) listNextResults(ctx context.Context, lastResults SetDefinitionListResult) (result SetDefinitionListResult, err error) {
+ req, err := lastResults.setDefinitionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SetDefinitionsClient) ListComplete(ctx context.Context) (result SetDefinitionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListBuiltIn this operation retrieves a list of all the built-in policy set definitions.
+func (client SetDefinitionsClient) ListBuiltIn(ctx context.Context) (result SetDefinitionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.ListBuiltIn")
+ defer func() {
+ sc := -1
+ if result.sdlr.Response.Response != nil {
+ sc = result.sdlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listBuiltInNextResults
+ req, err := client.ListBuiltInPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListBuiltIn", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBuiltInSender(req)
+ if err != nil {
+ result.sdlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListBuiltIn", resp, "Failure sending request")
+ return
+ }
+
+ result.sdlr, err = client.ListBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListBuiltIn", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBuiltInPreparer prepares the ListBuiltIn request.
+func (client SetDefinitionsClient) ListBuiltInPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Authorization/policySetDefinitions"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBuiltInSender sends the ListBuiltIn request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) ListBuiltInSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListBuiltInResponder handles the response to the ListBuiltIn request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) ListBuiltInResponder(resp *http.Response) (result SetDefinitionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBuiltInNextResults retrieves the next set of results, if any.
+func (client SetDefinitionsClient) listBuiltInNextResults(ctx context.Context, lastResults SetDefinitionListResult) (result SetDefinitionListResult, err error) {
+ req, err := lastResults.setDefinitionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listBuiltInNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBuiltInSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listBuiltInNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listBuiltInNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBuiltInComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SetDefinitionsClient) ListBuiltInComplete(ctx context.Context) (result SetDefinitionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.ListBuiltIn")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBuiltIn(ctx)
+ return
+}
+
+// ListByManagementGroup this operation retrieves a list of all the a policy set definition in the given management
+// group.
+// Parameters:
+// managementGroupID - the ID of the management group.
+func (client SetDefinitionsClient) ListByManagementGroup(ctx context.Context, managementGroupID string) (result SetDefinitionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.ListByManagementGroup")
+ defer func() {
+ sc := -1
+ if result.sdlr.Response.Response != nil {
+ sc = result.sdlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByManagementGroupNextResults
+ req, err := client.ListByManagementGroupPreparer(ctx, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListByManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByManagementGroupSender(req)
+ if err != nil {
+ result.sdlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListByManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.sdlr, err = client.ListByManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListByManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByManagementGroupPreparer prepares the ListByManagementGroup request.
+func (client SetDefinitionsClient) ListByManagementGroupPreparer(ctx context.Context, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ }
+
+ const APIVersion = "2019-09-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByManagementGroupSender sends the ListByManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) ListByManagementGroupSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListByManagementGroupResponder handles the response to the ListByManagementGroup request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) ListByManagementGroupResponder(resp *http.Response) (result SetDefinitionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByManagementGroupNextResults retrieves the next set of results, if any.
+func (client SetDefinitionsClient) listByManagementGroupNextResults(ctx context.Context, lastResults SetDefinitionListResult) (result SetDefinitionListResult, err error) {
+ req, err := lastResults.setDefinitionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listByManagementGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listByManagementGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listByManagementGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByManagementGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SetDefinitionsClient) ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result SetDefinitionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SetDefinitionsClient.ListByManagementGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByManagementGroup(ctx, managementGroupID)
+ return
+}
diff --git a/services/resources/mgmt/2019-09-01/policy/version.go b/services/resources/mgmt/2019-09-01/policy/version.go
new file mode 100644
index 000000000000..abcb254ae768
--- /dev/null
+++ b/services/resources/mgmt/2019-09-01/policy/version.go
@@ -0,0 +1,30 @@
+package policy
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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.
+
+// UserAgent returns the UserAgent string to use when sending http.Requests.
+func UserAgent() string {
+ return "Azure-SDK-For-Go/" + version.Number + " policy/2019-09-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/services/serialconsole/mgmt/2018-05-01/serialconsole/client.go b/services/serialconsole/mgmt/2018-05-01/serialconsole/client.go
index 33d59a00a544..fdc5b4671f12 100644
--- a/services/serialconsole/mgmt/2018-05-01/serialconsole/client.go
+++ b/services/serialconsole/mgmt/2018-05-01/serialconsole/client.go
@@ -1,6 +1,6 @@
// Package serialconsole implements the Azure ARM Serialconsole service API version 2018-05-01.
//
-// Azure Virtual Machine Serial Console allows you to access serial console of a Virtual Machine
+// The Azure Serial Console allows you to access the serial console of a Virtual Machine or VM scale set instance
package serialconsole
// Copyright (c) Microsoft and contributors. All rights reserved.
@@ -21,7 +21,11 @@ package serialconsole
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
)
const (
@@ -49,3 +53,296 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
SubscriptionID: subscriptionID,
}
}
+
+// DisableConsole disables the Serial Console service for all VMs and VM scale sets in the provided subscription
+// Parameters:
+// defaultParameter - default parameter. Leave the value as "default".
+func (client BaseClient) DisableConsole(ctx context.Context, defaultParameter string) (result SetObject, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DisableConsole")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DisableConsolePreparer(ctx, defaultParameter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "DisableConsole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DisableConsoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "DisableConsole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DisableConsoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "DisableConsole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DisableConsolePreparer prepares the DisableConsole request.
+func (client BaseClient) DisableConsolePreparer(ctx context.Context, defaultParameter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "default": autorest.Encode("path", defaultParameter),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DisableConsoleSender sends the DisableConsole request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) DisableConsoleSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// DisableConsoleResponder handles the response to the DisableConsole request. The method always
+// closes the http.Response Body.
+func (client BaseClient) DisableConsoleResponder(resp *http.Response) (result SetObject, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// EnableConsole enables the Serial Console service for all VMs and VM scale sets in the provided subscription
+// Parameters:
+// defaultParameter - default parameter. Leave the value as "default".
+func (client BaseClient) EnableConsole(ctx context.Context, defaultParameter string) (result SetObject, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.EnableConsole")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.EnableConsolePreparer(ctx, defaultParameter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "EnableConsole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.EnableConsoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "EnableConsole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.EnableConsoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "EnableConsole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// EnableConsolePreparer prepares the EnableConsole request.
+func (client BaseClient) EnableConsolePreparer(ctx context.Context, defaultParameter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "default": autorest.Encode("path", defaultParameter),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// EnableConsoleSender sends the EnableConsole request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) EnableConsoleSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// EnableConsoleResponder handles the response to the EnableConsole request. The method always
+// closes the http.Response Body.
+func (client BaseClient) EnableConsoleResponder(resp *http.Response) (result SetObject, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetConsoleStatus gets whether or not Serial Console is disabled for a given subscription
+// Parameters:
+// defaultParameter - default parameter. Leave the value as "default".
+func (client BaseClient) GetConsoleStatus(ctx context.Context, defaultParameter string) (result SetObject, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetConsoleStatus")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetConsoleStatusPreparer(ctx, defaultParameter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "GetConsoleStatus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetConsoleStatusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "GetConsoleStatus", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetConsoleStatusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "GetConsoleStatus", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetConsoleStatusPreparer prepares the GetConsoleStatus request.
+func (client BaseClient) GetConsoleStatusPreparer(ctx context.Context, defaultParameter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "default": autorest.Encode("path", defaultParameter),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetConsoleStatusSender sends the GetConsoleStatus request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) GetConsoleStatusSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// GetConsoleStatusResponder handles the response to the GetConsoleStatus request. The method always
+// closes the http.Response Body.
+func (client BaseClient) GetConsoleStatusResponder(resp *http.Response) (result SetObject, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListOperations gets a list of Serial Console API operations.
+func (client BaseClient) ListOperations(ctx context.Context) (result Operations, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListOperations")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListOperationsPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "ListOperations", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOperationsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "ListOperations", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListOperationsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "serialconsole.BaseClient", "ListOperations", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListOperationsPreparer prepares the ListOperations request.
+func (client BaseClient) ListOperationsPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.SerialConsole/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOperationsSender sends the ListOperations request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) ListOperationsSender(req *http.Request) (*http.Response, error) {
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
+}
+
+// ListOperationsResponder handles the response to the ListOperations request. The method always
+// closes the http.Response Body.
+func (client BaseClient) ListOperationsResponder(resp *http.Response) (result Operations, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/services/serialconsole/mgmt/2018-05-01/serialconsole/console.go b/services/serialconsole/mgmt/2018-05-01/serialconsole/console.go
deleted file mode 100644
index 5e3ffc917c3d..000000000000
--- a/services/serialconsole/mgmt/2018-05-01/serialconsole/console.go
+++ /dev/null
@@ -1,187 +0,0 @@
-package serialconsole
-
-// 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/go-autorest/autorest"
- "github.com/Azure/go-autorest/autorest/azure"
- "github.com/Azure/go-autorest/tracing"
- "net/http"
-)
-
-// ConsoleClient is the azure Virtual Machine Serial Console allows you to access serial console of a Virtual Machine
-type ConsoleClient struct {
- BaseClient
-}
-
-// NewConsoleClient creates an instance of the ConsoleClient client.
-func NewConsoleClient(subscriptionID string) ConsoleClient {
- return NewConsoleClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewConsoleClientWithBaseURI creates an instance of the ConsoleClient client.
-func NewConsoleClientWithBaseURI(baseURI string, subscriptionID string) ConsoleClient {
- return ConsoleClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// DisableConsole disables Serial Console for a subscription
-func (client ConsoleClient) DisableConsole(ctx context.Context) (result SetDisabledResult, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ConsoleClient.DisableConsole")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DisableConsolePreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "serialconsole.ConsoleClient", "DisableConsole", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.DisableConsoleSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "serialconsole.ConsoleClient", "DisableConsole", resp, "Failure sending request")
- return
- }
-
- result, err = client.DisableConsoleResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "serialconsole.ConsoleClient", "DisableConsole", resp, "Failure responding to request")
- }
-
- return
-}
-
-// DisableConsolePreparer prepares the DisableConsole request.
-func (client ConsoleClient) DisableConsolePreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "default": autorest.Encode("path", "default"),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsPost(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// DisableConsoleSender sends the DisableConsole request. The method will close the
-// http.Response Body if it receives an error.
-func (client ConsoleClient) DisableConsoleSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
-}
-
-// DisableConsoleResponder handles the response to the DisableConsole request. The method always
-// closes the http.Response Body.
-func (client ConsoleClient) DisableConsoleResponder(resp *http.Response) (result SetDisabledResult, err error) {
- err = autorest.Respond(
- resp,
- client.ByInspecting(),
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// EnableConsole enables Serial Console for a subscription
-func (client ConsoleClient) EnableConsole(ctx context.Context) (result SetDisabledResult, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ConsoleClient.EnableConsole")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.EnableConsolePreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "serialconsole.ConsoleClient", "EnableConsole", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.EnableConsoleSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "serialconsole.ConsoleClient", "EnableConsole", resp, "Failure sending request")
- return
- }
-
- result, err = client.EnableConsoleResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "serialconsole.ConsoleClient", "EnableConsole", resp, "Failure responding to request")
- }
-
- return
-}
-
-// EnableConsolePreparer prepares the EnableConsole request.
-func (client ConsoleClient) EnableConsolePreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "default": autorest.Encode("path", "default"),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsPost(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// EnableConsoleSender sends the EnableConsole request. The method will close the
-// http.Response Body if it receives an error.
-func (client ConsoleClient) EnableConsoleSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
-}
-
-// EnableConsoleResponder handles the response to the EnableConsole request. The method always
-// closes the http.Response Body.
-func (client ConsoleClient) EnableConsoleResponder(resp *http.Response) (result SetDisabledResult, err error) {
- err = autorest.Respond(
- resp,
- client.ByInspecting(),
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
diff --git a/services/serialconsole/mgmt/2018-05-01/serialconsole/list.go b/services/serialconsole/mgmt/2018-05-01/serialconsole/list.go
deleted file mode 100644
index bd4b390191ee..000000000000
--- a/services/serialconsole/mgmt/2018-05-01/serialconsole/list.go
+++ /dev/null
@@ -1,113 +0,0 @@
-package serialconsole
-
-// 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/go-autorest/autorest"
- "github.com/Azure/go-autorest/autorest/azure"
- "github.com/Azure/go-autorest/tracing"
- "net/http"
-)
-
-// ListClient is the azure Virtual Machine Serial Console allows you to access serial console of a Virtual Machine
-type ListClient struct {
- BaseClient
-}
-
-// NewListClient creates an instance of the ListClient client.
-func NewListClient(subscriptionID string) ListClient {
- return NewListClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewListClientWithBaseURI creates an instance of the ListClient client.
-func NewListClientWithBaseURI(baseURI string, subscriptionID string) ListClient {
- return ListClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// Operations gets a list of Serial Console API operations.
-func (client ListClient) Operations(ctx context.Context) (result Operations, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListClient.Operations")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.OperationsPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "serialconsole.ListClient", "Operations", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.OperationsSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "serialconsole.ListClient", "Operations", resp, "Failure sending request")
- return
- }
-
- result, err = client.OperationsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "serialconsole.ListClient", "Operations", resp, "Failure responding to request")
- }
-
- return
-}
-
-// OperationsPreparer prepares the Operations request.
-func (client ListClient) OperationsPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/operations", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// OperationsSender sends the Operations request. The method will close the
-// http.Response Body if it receives an error.
-func (client ListClient) OperationsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
-}
-
-// OperationsResponder handles the response to the Operations request. The method always
-// closes the http.Response Body.
-func (client ListClient) OperationsResponder(resp *http.Response) (result Operations, err error) {
- err = autorest.Respond(
- resp,
- client.ByInspecting(),
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
diff --git a/services/serialconsole/mgmt/2018-05-01/serialconsole/listconsole.go b/services/serialconsole/mgmt/2018-05-01/serialconsole/listconsole.go
deleted file mode 100644
index 672535b7725c..000000000000
--- a/services/serialconsole/mgmt/2018-05-01/serialconsole/listconsole.go
+++ /dev/null
@@ -1,115 +0,0 @@
-package serialconsole
-
-// 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/go-autorest/autorest"
- "github.com/Azure/go-autorest/autorest/azure"
- "github.com/Azure/go-autorest/tracing"
- "net/http"
-)
-
-// ListConsoleClient is the azure Virtual Machine Serial Console allows you to access serial console of a Virtual
-// Machine
-type ListConsoleClient struct {
- BaseClient
-}
-
-// NewListConsoleClient creates an instance of the ListConsoleClient client.
-func NewListConsoleClient(subscriptionID string) ListConsoleClient {
- return NewListConsoleClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewListConsoleClientWithBaseURI creates an instance of the ListConsoleClient client.
-func NewListConsoleClientWithBaseURI(baseURI string, subscriptionID string) ListConsoleClient {
- return ListConsoleClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// Disabled gets if Serial Console is disabled for a subscription.
-func (client ListConsoleClient) Disabled(ctx context.Context) (result GetDisabledResult, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListConsoleClient.Disabled")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DisabledPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "serialconsole.ListConsoleClient", "Disabled", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.DisabledSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "serialconsole.ListConsoleClient", "Disabled", resp, "Failure sending request")
- return
- }
-
- result, err = client.DisabledResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "serialconsole.ListConsoleClient", "Disabled", resp, "Failure responding to request")
- }
-
- return
-}
-
-// DisabledPreparer prepares the Disabled request.
-func (client ListConsoleClient) DisabledPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "default": autorest.Encode("path", "default"),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// DisabledSender sends the Disabled request. The method will close the
-// http.Response Body if it receives an error.
-func (client ListConsoleClient) DisabledSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
-}
-
-// DisabledResponder handles the response to the Disabled request. The method always
-// closes the http.Response Body.
-func (client ListConsoleClient) DisabledResponder(resp *http.Response) (result GetDisabledResult, err error) {
- err = autorest.Respond(
- resp,
- client.ByInspecting(),
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
diff --git a/services/serialconsole/mgmt/2018-05-01/serialconsole/models.go b/services/serialconsole/mgmt/2018-05-01/serialconsole/models.go
index 9f8a937e42d5..6e2a40f1484d 100644
--- a/services/serialconsole/mgmt/2018-05-01/serialconsole/models.go
+++ b/services/serialconsole/mgmt/2018-05-01/serialconsole/models.go
@@ -24,36 +24,56 @@ import (
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/serialconsole/mgmt/2018-05-01/serialconsole"
-// DeploymentValidateResult details on Failure
-type DeploymentValidateResult struct {
- // ErrorMessage - Error message
- ErrorMessage *string `json:"errorMessage,omitempty"`
+// DisableSerialConsoleResult returns whether or not Serial Console is disabled.
+type DisableSerialConsoleResult struct {
+ // Disabled - Whether or not Serial Console is disabled.
+ Disabled *bool `json:"disabled,omitempty"`
}
-// GetDisabledResult returns whether or not Serial Console is disabled for this given subscription
-type GetDisabledResult struct {
- autorest.Response `json:"-"`
- // Disabled - Disabled result
+// EnableSerialConsoleResult returns whether or not Serial Console is disabled (enabled).
+type EnableSerialConsoleResult struct {
+ // Disabled - Whether or not Serial Console is disabled (enabled).
Disabled *bool `json:"disabled,omitempty"`
}
-// GetResult returns whether or not Serial Console is disabled.
-type GetResult struct {
- // Value - Whether or not Serial Console is disabled.
- Value *bool `json:"value,omitempty"`
+// GetSerialConsoleSubscriptionNotFound error saying that the provided subscription could not be found
+type GetSerialConsoleSubscriptionNotFound struct {
+ // Code - Error code
+ Code *string `json:"code,omitempty"`
+ // Message - Subscription not found message
+ Message *string `json:"message,omitempty"`
}
// Operations serial Console operations
type Operations struct {
autorest.Response `json:"-"`
- // Value - Serial Console operations
- Value *string `json:"value,omitempty"`
+ // Value - A list of Serial Console operations
+ Value *[]OperationsValueItem `json:"value,omitempty"`
+}
+
+// OperationsValueItem ...
+type OperationsValueItem struct {
+ Name *string `json:"name,omitempty"`
+ IsDataAction *string `json:"isDataAction,omitempty"`
+ Display *OperationsValueItemDisplay `json:"display,omitempty"`
}
-// SetDisabledResult sets disable status and returns whether or not Serial Console is now disabled for this
-// given subscription
-type SetDisabledResult struct {
+// OperationsValueItemDisplay ...
+type OperationsValueItemDisplay struct {
+ Provider *string `json:"provider,omitempty"`
+ Resource *string `json:"resource,omitempty"`
+ Operation *string `json:"operation,omitempty"`
+ Description *string `json:"description,omitempty"`
+}
+
+// SetObject ...
+type SetObject struct {
autorest.Response `json:"-"`
- // Disabled - Disabled result
+ Value interface{} `json:"value,omitempty"`
+}
+
+// Status returns whether or not Serial Console is disabled.
+type Status struct {
+ // Disabled - Whether or not Serial Console is disabled.
Disabled *bool `json:"disabled,omitempty"`
}
diff --git a/services/serialconsole/mgmt/2018-05-01/serialconsole/serialconsoleapi/interfaces.go b/services/serialconsole/mgmt/2018-05-01/serialconsole/serialconsoleapi/interfaces.go
index 085688c7f15c..def4c515dd0d 100644
--- a/services/serialconsole/mgmt/2018-05-01/serialconsole/serialconsoleapi/interfaces.go
+++ b/services/serialconsole/mgmt/2018-05-01/serialconsole/serialconsoleapi/interfaces.go
@@ -22,24 +22,12 @@ import (
"github.com/Azure/azure-sdk-for-go/services/serialconsole/mgmt/2018-05-01/serialconsole"
)
-// ListClientAPI contains the set of methods on the ListClient type.
-type ListClientAPI interface {
- Operations(ctx context.Context) (result serialconsole.Operations, err error)
+// BaseClientAPI contains the set of methods on the BaseClient type.
+type BaseClientAPI interface {
+ DisableConsole(ctx context.Context, defaultParameter string) (result serialconsole.SetObject, err error)
+ EnableConsole(ctx context.Context, defaultParameter string) (result serialconsole.SetObject, err error)
+ GetConsoleStatus(ctx context.Context, defaultParameter string) (result serialconsole.SetObject, err error)
+ ListOperations(ctx context.Context) (result serialconsole.Operations, err error)
}
-var _ ListClientAPI = (*serialconsole.ListClient)(nil)
-
-// ListConsoleClientAPI contains the set of methods on the ListConsoleClient type.
-type ListConsoleClientAPI interface {
- Disabled(ctx context.Context) (result serialconsole.GetDisabledResult, err error)
-}
-
-var _ ListConsoleClientAPI = (*serialconsole.ListConsoleClient)(nil)
-
-// ConsoleClientAPI contains the set of methods on the ConsoleClient type.
-type ConsoleClientAPI interface {
- DisableConsole(ctx context.Context) (result serialconsole.SetDisabledResult, err error)
- EnableConsole(ctx context.Context) (result serialconsole.SetDisabledResult, err error)
-}
-
-var _ ConsoleClientAPI = (*serialconsole.ConsoleClient)(nil)
+var _ BaseClientAPI = (*serialconsole.BaseClient)(nil)
diff --git a/services/signalr/mgmt/2018-10-01/signalr/models.go b/services/signalr/mgmt/2018-10-01/signalr/models.go
index 39a3e259d3a8..a500056701ec 100644
--- a/services/signalr/mgmt/2018-10-01/signalr/models.go
+++ b/services/signalr/mgmt/2018-10-01/signalr/models.go
@@ -30,6 +30,21 @@ import (
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/signalr/mgmt/2018-10-01/signalr"
+// FeatureFlags enumerates the values for feature flags.
+type FeatureFlags string
+
+const (
+ // EnableConnectivityLogs ...
+ EnableConnectivityLogs FeatureFlags = "EnableConnectivityLogs"
+ // ServiceMode ...
+ ServiceMode FeatureFlags = "ServiceMode"
+)
+
+// PossibleFeatureFlagsValues returns an array of possible values for the FeatureFlags const type.
+func PossibleFeatureFlagsValues() []FeatureFlags {
+ return []FeatureFlags{EnableConnectivityLogs, ServiceMode}
+}
+
// KeyType enumerates the values for key type.
type KeyType string
@@ -211,10 +226,31 @@ type Dimension struct {
ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"`
}
+// ErrorResponse contains information about an API error.
+type ErrorResponse struct {
+ // Error - Describes a particular API error with an error code and a message.
+ Error *ErrorResponseBody `json:"error,omitempty"`
+}
+
+// ErrorResponseBody describes a particular API error with an error code and a message.
+type ErrorResponseBody struct {
+ // Code - An error code that describes the error condition more precisely than an HTTP status code.
+ // Can be used to programmatically handle specific error cases.
+ Code *string `json:"code,omitempty"`
+ // Message - A message that describes the error in detail and provides debugging information.
+ Message *string `json:"message,omitempty"`
+ // Target - The target of the particular error (for example, the name of the property in error).
+ Target *string `json:"target,omitempty"`
+ // Details - Contains nested errors that are related to this error.
+ Details *[]ErrorResponseBody `json:"details,omitempty"`
+}
+
// Feature feature of a SignalR resource, which controls the SignalR runtime behavior.
type Feature struct {
- // Flag - Kind of feature. Required.
- Flag *string `json:"flag,omitempty"`
+ // Flag - FeatureFlags is the supported features of Azure SignalR service.
+ // - ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend server; "Classic": for backward compatibility. Support both Default and Serverless mode but not recommended; "PredefinedOnly": for future use.
+ // - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category respectively. Possible values include: 'ServiceMode', 'EnableConnectivityLogs'
+ Flag FeatureFlags `json:"flag,omitempty"`
// Value - Value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed values.
Value *string `json:"value,omitempty"`
// Properties - Optional properties related to this feature.
@@ -224,7 +260,7 @@ type Feature struct {
// MarshalJSON is the custom marshaler for Feature.
func (f Feature) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- if f.Flag != nil {
+ if f.Flag != "" {
objectMap["flag"] = f.Flag
}
if f.Value != nil {
@@ -249,6 +285,14 @@ type Keys struct {
SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"`
}
+// LogSpecification specifications of the Logs for Azure Monitoring.
+type LogSpecification struct {
+ // Name - Name of the log.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - Localized friendly display name of the log.
+ DisplayName *string `json:"displayName,omitempty"`
+}
+
// MetricSpecification specifications of the Metrics for Azure Monitoring.
type MetricSpecification struct {
// Name - Name of the metric.
@@ -852,6 +896,8 @@ func (future *RestartFuture) Result(client Client) (ar autorest.Response, err er
type ServiceSpecification struct {
// MetricSpecifications - Specifications of the Metrics for Azure Monitoring.
MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
+ // LogSpecifications - Specifications of the Logs for Azure Monitoring.
+ LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
}
// TrackedResource the resource model definition for a ARM tracked top level resource.
diff --git a/services/storage/mgmt/2019-06-01/storage/blobservices.go b/services/storage/mgmt/2019-06-01/storage/blobservices.go
index bd3dc1ea0b20..8f29d93d078e 100644
--- a/services/storage/mgmt/2019-06-01/storage/blobservices.go
+++ b/services/storage/mgmt/2019-06-01/storage/blobservices.go
@@ -265,6 +265,12 @@ func (client BlobServicesClient) SetServiceProperties(ctx context.Context, resou
{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
}},
}},
+ {Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil},
+ {Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
+ }},
+ }},
}}}}}); err != nil {
return result, validation.NewError("storage.BlobServicesClient", "SetServiceProperties", err.Error())
}
diff --git a/services/storage/mgmt/2019-06-01/storage/fileservices.go b/services/storage/mgmt/2019-06-01/storage/fileservices.go
index 8e51cb0cb250..ff5cf18860cb 100644
--- a/services/storage/mgmt/2019-06-01/storage/fileservices.go
+++ b/services/storage/mgmt/2019-06-01/storage/fileservices.go
@@ -256,7 +256,16 @@ func (client FileServicesClient) SetServiceProperties(ctx context.Context, resou
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
{Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
{TargetValue: client.SubscriptionID,
- Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil},
+ {Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
+ }},
+ }},
+ }}}}}); err != nil {
return result, validation.NewError("storage.FileServicesClient", "SetServiceProperties", err.Error())
}
diff --git a/services/storage/mgmt/2019-06-01/storage/models.go b/services/storage/mgmt/2019-06-01/storage/models.go
index 7a0a714f741c..c83dfc8724a5 100644
--- a/services/storage/mgmt/2019-06-01/storage/models.go
+++ b/services/storage/mgmt/2019-06-01/storage/models.go
@@ -1502,12 +1502,14 @@ type BlobServicePropertiesProperties struct {
Cors *CorsRules `json:"cors,omitempty"`
// DefaultServiceVersion - DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions.
DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"`
- // DeleteRetentionPolicy - The blob service properties for soft delete.
+ // DeleteRetentionPolicy - The blob service properties for blob soft delete.
DeleteRetentionPolicy *DeleteRetentionPolicy `json:"deleteRetentionPolicy,omitempty"`
// AutomaticSnapshotPolicyEnabled - Automatic Snapshot is enabled if set to true.
AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"`
// ChangeFeed - The blob service properties for change feed events.
ChangeFeed *ChangeFeed `json:"changeFeed,omitempty"`
+ // ContainerDeleteRetentionPolicy - The blob service properties for container soft delete.
+ ContainerDeleteRetentionPolicy *DeleteRetentionPolicy `json:"containerDeleteRetentionPolicy,omitempty"`
}
// ChangeFeed the blob service properties for change feed events.
@@ -1775,6 +1777,8 @@ func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error {
type FileServicePropertiesProperties struct {
// Cors - Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service.
Cors *CorsRules `json:"cors,omitempty"`
+ // ShareDeleteRetentionPolicy - The file service properties for share soft delete.
+ ShareDeleteRetentionPolicy *DeleteRetentionPolicy `json:"shareDeleteRetentionPolicy,omitempty"`
}
// FileShare properties of the file share, including Id, resource name, resource type, Etag.
diff --git a/version/version.go b/version/version.go
index f50d7da23510..4a5edd7cb681 100644
--- a/version/version.go
+++ b/version/version.go
@@ -18,4 +18,4 @@ package version
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Number contains the semantic version of this SDK.
-const Number = "v35.1.0"
+const Number = "v36.0.0"