public ToSDKProfile ( ) : Microsoft.Azure.Management.TrafficManager.Models.Profile | ||
Результат | Microsoft.Azure.Management.TrafficManager.Models.Profile |
public TrafficManagerProfile SetTrafficManagerProfile(TrafficManagerProfile profile) { var parameteres = new ProfileCreateOrUpdateParameters { Profile = profile.ToSDKProfile() }; ProfileCreateOrUpdateResponse response = this.TrafficManagerManagementClient.Profiles.CreateOrUpdate( profile.ResourceGroupName, profile.Name, parameteres ); return TrafficManagerClient.GetPowershellTrafficManagerProfile(profile.ResourceGroupName, profile.Name, response.Profile.Properties); }
public bool EnableDisableTrafficManagerProfile(TrafficManagerProfile profile, bool shouldEnableProfileStatus) { profile.ProfileStatus = shouldEnableProfileStatus ? Constants.StatusEnabled : Constants.StatusDisabled; Profile sdkProfile = profile.ToSDKProfile(); sdkProfile.Properties.DnsConfig = null; sdkProfile.Properties.Endpoints = null; sdkProfile.Properties.TrafficRoutingMethod = null; sdkProfile.Properties.MonitorConfig = null; var parameters = new ProfileUpdateParameters { Profile = sdkProfile }; AzureOperationResponse response = this.TrafficManagerManagementClient.Profiles.Update(profile.ResourceGroupName, profile.Name, parameters); return response.StatusCode.Equals(HttpStatusCode.OK); }