Skip to content

Commit e880c23

Browse files
authored
Merge pull request #4429 from Azure/angshumannayak-patch-1
AddAzureRMLogProfile - Angshuman patch 2
2 parents ddf243d + b743cd6 commit e880c23

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

src/ResourceManager/Insights/Commands.Insights/help/Add-AzureRmLogProfile.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ schema: 2.0.0
88
# Add-AzureRmLogProfile
99

1010
## SYNOPSIS
11-
Creates a log profile.
11+
Creates a new activity log profile. This profile is used to either archive the activity log to an Azure storage account or stream it to an Azure event hub in the same subscription.
12+
13+
- **Storage Account** - Only standard storage account (premium storage account is not supported) is supported. It could either be of type ARM or Classic. If it's logged to a storage account, the cost of storing the activity log is billed at normal standard storage rates. There could be only one log profile per subscription consequentially only one storage account per subscription can be used to export activity log.
14+
15+
- **Event Hub** - There could be only one log profile per subscription consequentially only one event hub per subscription can be used to export activity log. If activity log is streamed to an event hub, standard event hub pricing will apply.
16+
17+
In the activity log, events can pertain to a region or could be "Global". Global essentially means these events are region agnostics and are independent of region, in fact majority of events fall into this category. If the activity log profile is set from the portal, it implicitly adds "Global" along with any other region selected in the user interface. When using the cmdlet, the location as "Global" must be explicitly mentioned apart from any other region.
18+
19+
**Note** :- **Failing to set "Global" in the locations will result in a majority of activity log not getting exported.**
1220

1321
## SYNTAX
1422

@@ -22,10 +30,9 @@ Add-AzureRmLogProfile -Name <String> [-StorageAccountId <String>] [-ServiceBusRu
2230
The **Add-AzureRmLogProfile** cmdlet creates a log profile.
2331

2432
## EXAMPLES
25-
26-
### 1:
27-
```
28-
33+
### Example 1 : Add a new log profile to export the activity log matching the location condition to a storage account
34+
```yaml
35+
Add-AzureRmLogProfile -Locations "Global","West US" -Name ExportLogProfile -StorageAccountId /subscriptions/40gpe80s-9sb7-4f07-9042-b1b6a92ja9fk/resourceGroups/activitylogRG/providers/Microsoft.Storage/storageAccounts/activitylogstorageaccount
2936
```
3037

3138
## PARAMETERS
@@ -46,7 +53,10 @@ Accept wildcard characters: False
4653
```
4754
4855
### -Locations
49-
Specifies the list of locations.
56+
Specifies the location of the log profile.
57+
Valid values: Run below cmdlet to get the latest list of locations.
58+
59+
Get-AzureLocation | Select DisplayName
5060
5161
```yaml
5262
Type: System.Collections.Generic.List`1[System.String]
@@ -76,7 +86,7 @@ Accept wildcard characters: False
7686
```
7787
7888
### -RetentionInDays
79-
Specifies the retention policy, in days.
89+
Specifies the retention policy, in days. This is the number of days the logs are preserved in the storage account specified. To retain the data forever set this to **0**. If it's not specified, then it defaults to **0**. Normal standard storage or event hub billing rates will apply for data retention.
8090
8191
```yaml
8292
Type: Int32
@@ -106,7 +116,9 @@ Accept wildcard characters: False
106116
```
107117
108118
### -StorageAccountId
109-
Specifies the ID of the Storage account.
119+
Specifies the ID of the Storage account. ID is the fully qualified Resource ID of the storage account for example
120+
121+
/subscriptions/40gpe80s-9sb7-4f07-9042-b1b6a92ja9fk/resourceGroups/activitylogRG/providers/Microsoft.Storage/storageAccounts/activitylogstorageaccount
110122
111123
```yaml
112124
Type: String

0 commit comments

Comments
 (0)