diff --git a/profiles/latest/web/mgmt/web/models.go b/profiles/latest/web/mgmt/web/models.go index f0e47dfad48c..0120488714d2 100644 --- a/profiles/latest/web/mgmt/web/models.go +++ b/profiles/latest/web/mgmt/web/models.go @@ -931,6 +931,7 @@ type MSDeployLogProperties = original.MSDeployLogProperties type MSDeployStatus = original.MSDeployStatus type MSDeployStatusProperties = original.MSDeployStatusProperties type ManagedServiceIdentity = original.ManagedServiceIdentity +type ManagedServiceIdentityUserAssignedIdentitiesValue = original.ManagedServiceIdentityUserAssignedIdentitiesValue type MetricAvailabilily = original.MetricAvailabilily type MetricAvailability = original.MetricAvailability type MetricDefinition = original.MetricDefinition diff --git a/profiles/preview/web/mgmt/web/models.go b/profiles/preview/web/mgmt/web/models.go index 6af38f210a64..84ac2b431522 100644 --- a/profiles/preview/web/mgmt/web/models.go +++ b/profiles/preview/web/mgmt/web/models.go @@ -931,6 +931,7 @@ type MSDeployLogProperties = original.MSDeployLogProperties type MSDeployStatus = original.MSDeployStatus type MSDeployStatusProperties = original.MSDeployStatusProperties type ManagedServiceIdentity = original.ManagedServiceIdentity +type ManagedServiceIdentityUserAssignedIdentitiesValue = original.ManagedServiceIdentityUserAssignedIdentitiesValue type MetricAvailabilily = original.MetricAvailabilily type MetricAvailability = original.MetricAvailability type MetricDefinition = original.MetricDefinition diff --git a/services/web/mgmt/2018-02-01/web/models.go b/services/web/mgmt/2018-02-01/web/models.go index d5af9ab4b30d..bdca052f48d4 100644 --- a/services/web/mgmt/2018-02-01/web/models.go +++ b/services/web/mgmt/2018-02-01/web/models.go @@ -12258,8 +12258,34 @@ type ManagedServiceIdentity struct { TenantID *string `json:"tenantId,omitempty"` // PrincipalID - Principal Id of managed service identity. PrincipalID *string `json:"principalId,omitempty"` - // IdentityIds - Array of UserAssigned managed service identities. - IdentityIds *[]string `json:"identityIds,omitempty"` + // UserAssignedIdentities - The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} + UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for ManagedServiceIdentity. +func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if msi.Type != "" { + objectMap["type"] = msi.Type + } + if msi.TenantID != nil { + objectMap["tenantId"] = msi.TenantID + } + if msi.PrincipalID != nil { + objectMap["principalId"] = msi.PrincipalID + } + if msi.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// ManagedServiceIdentityUserAssignedIdentitiesValue ... +type ManagedServiceIdentityUserAssignedIdentitiesValue struct { + // PrincipalID - Principal Id of user assigned identity + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - Client Id of user assigned identity + ClientID *string `json:"clientId,omitempty"` } // MetricAvailabilily metric availability and retention.