Skip to content

Commit

Permalink
Adding adding get ipAggregates API. (Azure#9038)
Browse files Browse the repository at this point in the history
* Adding adding get ipAggregates API.

* Adding 'extranet' and 'paginized' to the custom word file.

* Adding Get IpAddressAggregateSettings.

* Adding Patch IpAddressAggregateSettings.

* Updated with PR comments.

* Minor edit.

* Minor change from 'Ip' to 'IP'.

* Minor update.

* Minor update.

* Fixing test.
  • Loading branch information
henrycyan authored and 00Kai0 committed Oct 12, 2020
1 parent 2b80297 commit 8e10fdc
Show file tree
Hide file tree
Showing 5 changed files with 331 additions and 1 deletion.
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ exportstatus
externaldatasources
externalDNSIPAddress01
externalDNSIPAddress02
extranet
EYWQ
faceapi
facelists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3535,6 +3535,125 @@
}
}
}
},
"/providers/Microsoft.ADHybridHealthService/services/{serviceName}/ipAddressAggregates": {
"get": {
"tags": [
"Reports"
],
"description": "Gets the IP address aggregates for a given service.",
"x-ms-examples": {
"list_IPAddressAggregatesByService": {
"$ref": "./examples/IpAddressAggregates.json"
}
},
"operationId": "list_IPAddressAggregatesByService",
"parameters": [
{
"name": "serviceName",
"in": "path",
"description": "The name of the service.",
"required": true,
"type": "string"
},
{
"name": "skiptoken",
"in": "query",
"description": "A continuationtoken value returned in paginated result to load different pages.",
"required": false,
"type": "string"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "The list of IP addresses.",
"schema": {
"$ref": "#/definitions/IPAddressAggregates"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/providers/Microsoft.ADHybridHealthService/services/{serviceName}/ipAddressAggregateSettings": {
"get": {
"tags": [
"Reports"
],
"description": "Gets the IP address aggregate settings.",
"x-ms-examples": {
"list_IPAddressAggregateSettings": {
"$ref": "./examples/IpAddressAggregateSettings.json"
}
},
"operationId": "list_IPAddressAggregateSettings",
"parameters": [
{
"name": "serviceName",
"in": "path",
"description": "The name of the service.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "IP address aggregate settings.",
"schema": {
"$ref": "#/definitions/IPAddressAggregateSetting"
}
}
}
},
"patch": {
"tags": [
"Configuration"
],
"description": "Updates the IP address aggregate settings alert thresholds.",
"x-ms-examples": {
"update_IPAddressAggregateSettings": {
"$ref": "./examples/IpAddressAggregateSettingsUpdate.json"
}
},
"operationId": "update_IPAddressAggregateSettings",
"parameters": [
{
"name": "serviceName",
"in": "path",
"description": "The name of the service.",
"required": true,
"type": "string"
},
{
"name": "IPAddressAggregateSetting",
"in": "body",
"description": "The IP address aggregate setting object.",
"required": true,
"schema": {
"$ref": "#/definitions/IPAddressAggregateSetting"
}
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "IP AddressAggregate Settings.",
"schema": {
"$ref": "#/definitions/IPAddressAggregateSetting"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -4939,7 +5058,7 @@
"type": "string"
},
"ipAddress": {
"description": "The Ip address corresponding to the last error event.",
"description": "The IP address corresponding to the last error event.",
"type": "string"
},
"lastUpdated": {
Expand Down Expand Up @@ -5331,6 +5450,135 @@
}
}
},
"IPAddressAggregate": {
"description": "The key value pair for properties.",
"type": "object",
"properties": {
"id": {
"description": "Unique ID for the entree",
"type": "string"
},
"tenantId": {
"description": "The tenant ID",
"type": "string"
},
"serviceId": {
"description": "The service ID",
"type": "string"
},
"ipAddress": {
"description": "The IP address from where the attempted login originated from.",
"type": "string"
},
"timestamp": {
"description": "When the event occurred",
"type": "string"
},
"firstAuditTimestamp": {
"description": "The first audit timestamp",
"type": "string"
},
"lastAuditTimestamp": {
"description": "The last audit timestamp",
"type": "string"
},
"extranetLockoutErrorCount": {
"description": "The extranet lockout error count",
"type": "integer"
},
"badPasswordErrorCount": {
"description": "The bad password error count",
"type": "integer"
},
"uniqueUsernamesAttemptedCount": {
"description": "The unique usernames attempted",
"type": "integer"
},
"attemptCountThresholdIsExceeded": {
"description": "A value indicating whether the attempt count threshold been exceeded",
"type": "boolean"
},
"timeSpan": {
"description": "The duration of the event",
"type": "string"
},
"isWhitelistedIpAddress": {
"description": "A value indicating whether the IP address has been whitelisted.",
"type": "boolean"
},
"networkLocation": {
"description": "The network location",
"type": "string"
},
"attemptCountThresholdOnTrigger": {
"description": "The attempted count threshold on trigger.",
"type": "integer"
},
"attemptThresholdTypeOnTrigger": {
"description": "The attempted threshold type on trigger.",
"type": "string"
},
"geographicLocation": {
"description": "The geographic location.",
"type": "string"
}
}
},
"IPAddressAggregates": {
"description": "IP address aggregates.",
"type": "object",
"properties": {
"value": {
"description": "The value returned by the operation.",
"type": "array",
"items": {
"$ref": "#/definitions/IPAddressAggregate"
}
},
"nextLink": {
"description": "URL to get the next set of IP Aggregate list results if there are any.",
"type": "string"
},
"totalCount": {
"description": "The number of results.",
"type": "integer"
},
"continuationToken": {
"description": "The continuation token for paginated calls.",
"type": "string"
}
}
},
"IPAddressAggregateSetting": {
"description": "The key value pair for IP aggregate thresholds.",
"type": "object",
"properties": {
"id": {
"description": "Unique ID for the entree",
"type": "string"
},
"badPasswordAndExtranetLockoutCombinedDailyThreshold": {
"description": "This threshold setting defines the per day trigger for a new event to be generated in the report.",
"type": "integer"
},
"badPasswordAndExtranetLockoutCombinedHourlyThreshold": {
"description": "This threshold setting defines the per hour trigger for a new event to be generated in the report.",
"type": "integer"
},
"extranetLockoutDailyThreshold": {
"description": "This threshold setting defines the per hour trigger for a new event to be generated in the report.",
"type": "integer"
},
"extranetLockoutHourlyThreshold": {
"description": "This threshold setting defines the per hour trigger for a new event to be generated in the report.",
"type": "integer"
},
"emailNotificationEnabled": {
"description": "A value indicating whether email notification has been enabled.",
"type": "boolean"
}
}
},
"Item": {
"description": "The key value pair for properties.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"serviceName": "sampleServiceName",
"api-version": "2014-01-01"
},
"responses": {
"200": {
"body": {
"id": "ipAddressAggregateSettings",
"badPasswordAndExtranetLockoutCombinedDailyThreshold": 11,
"badPasswordAndExtranetLockoutCombinedHourlyThreshold": 7,
"extranetLockoutDailyThreshold": 7,
"extranetLockoutHourlyThreshold": 8,
"emailNotificationEnabled": true
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"serviceName": "sampleServiceName",
"IPAddressAggregateSetting": {
"id": "ipAddressAggregateSettings",
"badPasswordAndExtranetLockoutCombinedDailyThreshold": 11,
"badPasswordAndExtranetLockoutCombinedHourlyThreshold": 7,
"extranetLockoutDailyThreshold": 7,
"extranetLockoutHourlyThreshold": 8,
"emailNotificationEnabled": true
},
"api-version": "2014-01-01"
},
"responses": {
"200": {
"body": {
"id": "ipAddressAggregateSettings",
"badPasswordAndExtranetLockoutCombinedDailyThreshold": 11,
"badPasswordAndExtranetLockoutCombinedHourlyThreshold": 7,
"extranetLockoutDailyThreshold": 7,
"extranetLockoutHourlyThreshold": 8,
"emailNotificationEnabled": true
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parameters": {
"serviceName": "sampleServiceName",
"skiptoken": "someSkipToken",
"api-version": "2014-01-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "MjE1MjI4L2hvdXIvRXh0cmFuZXQvLS8wL1RydWU=",
"tenantId": "22fbe147-e69f-40a3-b5ee-578e52b73640",
"serviceId": "1b322937-1795-43d7-988c-cdb238ff906f",
"ipAddress": "-",
"timestamp": "2020-02-20T23:00:00Z",
"firstAuditTimestamp": "2020-02-27T23:01:12.015Z",
"lastAuditTimestamp": "2020-02-26T23:44:45Z",
"extranetLockoutErrorCount": 4,
"badPasswordErrorCount": 24,
"uniqueUsernamesAttemptedCount": 19,
"attemptCountThresholdIsExceeded": true,
"timeSpan": "hour",
"isWhitelistedIpAddress": true,
"networkLocation": "Extranet",
"attemptCountThresholdOnTrigger": 0,
"attemptThresholdTypeOnTrigger": "NotSet",
"geographicLocation": null
}
],
"nextLink": null,
"totalCount": 1,
"continuationToken": null
}
}
}
}

0 comments on commit 8e10fdc

Please sign in to comment.