Skip to content

[Monitor] az monitor diagnostic-settings create -h #2582

@vishrutshah

Description

@vishrutshah
(env) vishrut@visshamac azure-cli (monitor) $ az monitor diagnostic-settings create -h

Command
    az monitor diagnostic-settings create: Create or update new diagnostic settings for the
    specified resource.

Arguments
    --location -l [Required]: Location. You can configure the default location using 'az configure
                              --defaults location=<location>'.
    --resource-id [Required]: The identifier of the resource.
    --logs                  : JSON encoded list of logs settings. Use @{file} to load from a file.
    --metrics               : JSON encoded list of metric settings. Use @{file} to load from a file.
    --name                  : Azure resource name.
    --service-bus-rule-id   : The service bus rule ID of the service bus namespace in which you
                              would like to have Event Hubs created for streaming Diagnostic Logs.
                              The rule ID is of the format: '{service bus resource
                              ID}/authorizationrules/{key name}'.
    --storage-account-id    : The resource ID of the storage account to which you would like to send
                              Diagnostic Logs.
    --tags                  : Resource tags.
    --workspace-id          : The workspace ID (resource ID of a Log Analytics workspace) for a Log
                              Analytics workspace to which you would like to send Diagnostic Logs.
                              Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceG
                              roups/insights-integration/providers/Microsoft.OperationalInsights/wor
                              kspaces/viruela2.

CLI should accept Ids/name for parameters like workspace-id, storage-account-id, service-bus-rule-id and resource-id.

Why location is required parameter + do we need to expose --resource-group?

cc:
@tjprescott / @johnkemnetz

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions