Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nithin/sdkupdates 2019 06 version #6645

Merged
merged 3 commits into from
Jun 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -319,7 +319,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -505,7 +505,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -684,7 +684,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "actionGroupPatch");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -866,7 +866,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1044,7 +1044,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1237,7 +1237,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "receiverName");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-06-01";
EnableRequest enableRequest = new EnableRequest();
if (receiverName != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,23 @@ public WebhookReceiver()
/// sent.</param>
/// <param name="useCommonAlertSchema">Indicates whether to use common
/// alert schema.</param>
public WebhookReceiver(string name, string serviceUri, bool useCommonAlertSchema)
/// <param name="useAadAuth">Indicates whether or not use AAD
/// authentication.</param>
/// <param name="objectId">Indicates the webhook app object Id for aad
/// auth.</param>
/// <param name="identifierUri">Indicates the identifier uri for aad
/// auth.</param>
/// <param name="tenantId">Indicates the tenant id for aad
/// auth.</param>
public WebhookReceiver(string name, string serviceUri, bool useCommonAlertSchema, bool? useAadAuth = default(bool?), string objectId = default(string), string identifierUri = default(string), string tenantId = default(string))
{
Name = name;
ServiceUri = serviceUri;
UseCommonAlertSchema = useCommonAlertSchema;
UseAadAuth = useAadAuth;
ObjectId = objectId;
IdentifierUri = identifierUri;
TenantId = tenantId;
CustomInit();
}

Expand Down Expand Up @@ -68,6 +80,30 @@ public WebhookReceiver(string name, string serviceUri, bool useCommonAlertSchema
[JsonProperty(PropertyName = "useCommonAlertSchema")]
public bool UseCommonAlertSchema { get; set; }

/// <summary>
/// Gets or sets indicates whether or not use AAD authentication.
/// </summary>
[JsonProperty(PropertyName = "useAadAuth")]
public bool? UseAadAuth { get; set; }

/// <summary>
/// Gets or sets indicates the webhook app object Id for aad auth.
/// </summary>
[JsonProperty(PropertyName = "objectId")]
public string ObjectId { get; set; }

/// <summary>
/// Gets or sets indicates the identifier uri for aad auth.
/// </summary>
[JsonProperty(PropertyName = "identifierUri")]
public string IdentifierUri { get; set; }

/// <summary>
/// Gets or sets indicates the tenant id for aad auth.
/// </summary>
[JsonProperty(PropertyName = "tenantId")]
public string TenantId { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PropertyGroup>
<Description>Microsoft Azure Monitor Library</Description>
<AssemblyName>Microsoft.Azure.Management.Monitor</AssemblyName>
<Version>0.22.0-preview</Version>
<Version>0.23.0-preview</Version>
<PackageId>Microsoft.Azure.Management.Monitor</PackageId>
<PackageTags>Management.Monitor;Management.Monitoring;metrics;alerts;autoscale;activityLogs;events;operations;logs;</PackageTags>
<PackageReleaseNotes>Added Multi Resource Alert changes for Metric Alert API and their Unit tests and Scenario Tests.</PackageReleaseNotes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private static ActionGroupResource GetCreateOrUpdateActionGroupParameter(
tags: new Dictionary<string, string>(),
emailReceivers: emailReceivers ?? new List<EmailReceiver>
{
new EmailReceiver(name: "emailreceiver", emailAddress: "[email protected]", status: ReceiverStatus.Disabled)
new EmailReceiver(name: "emailreceiver", emailAddress: "[email protected]", useCommonAlertSchema: false , status: ReceiverStatus.Disabled)
},
smsReceivers: smsReceivers ?? new List<SmsReceiver>
{
Expand Down