Skip to content
Open
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 @@ -144,45 +144,48 @@ def _build_arguments_schema(cls, *args, **kwargs):
args_schema.receiver_actions = AAZCustomListArg(
options=["--actions"],
singular_options=["--action", "-a"],
help="Add receivers to the action group during the creation." + '''
Usage: --action TYPE NAME [ARG ...]
Email:
Format: --action email NAME EMAIL_ADDRESS [usecommonalertschema]
Example: --action email bob bob@contoso.com
SMS:
Format: --action sms NAME COUNTRY_CODE PHONE_NUMBER
Example: --action sms charli 1 5551234567
Webhook:
Format: --action webhook NAME URI [useaadauth OBJECT_ID IDENTIFIER URI] [usecommonalertschema]
Example: --action webhook alert_hook https://www.contoso.com/alert useaadauth testobj http://identifier usecommonalertschema
Arm Role:
Format: --action armrole NAME ROLE_ID [usecommonalertschema]
Example: --action armole owner_role 8e3af657-a8ff-443c-a75c-2fe8c4bcb635
Azure App Push:
Format: --action azureapppush NAME EMAIL_ADDRESS
Example: --action azureapppush test_apppush bob@contoso.com
ITSM:
Format: --action itsm NAME WORKSPACE_ID CONNECTION_ID TICKET_CONFIGURATION REGION
Example: --action itsm test_itsm test_workspace test_conn ticket_blob useast
Automation runbook:
Format: --action automationrunbook NAME AUTOMATION_ACCOUNT_ID RUNBOOK_NAME WEBHOOK_RESOURCE_ID SERVICE_URI [isglobalrunbook] [usecommonalertschema]
Example: --action automationrunbook test_runbook test_acc test_book test_webhook test_rsrc http://example.com isglobalrunbook usecommonalertschema
Voice:
Format: --action voice NAME COUNTRY_CODE PHONE_NUMBER
Example: --action voice charli 1 4441234567
Logic App:
Format: --action logicapp NAME RESOURCE_ID CALLBACK_URL [usecommonalertschema]
Example: --action logicapp test_logicapp test_rsrc http://callback
Azure Function:
Format: --action azurefunction NAME FUNCTION_APP_RESOURCE_ID FUNCTION_NAME HTTP_TRIGGER_URL [usecommonalertschema]
Example: --action azurefunction test_function test_rsrc test_func http://trigger usecommonalertschema
Event Hub:
Format: --action eventhub NAME SUBSCRIPTION_ID EVENT_HUB_NAME_SPACE EVENT_HUB_NAME [usecommonalertschema]
Example: --action eventhub test_eventhub 5def922a-3ed4-49c1-b9fd-05ec533819a3 eventhubNameSpace testEventHubName usecommonalertschema
Multiple actions can be specified by using more than one `--add-action` argument.
'useaadauth', 'isglobalrunbook' and 'usecommonalertschema' are optional arguements that only need to be passed to set the respective parameter to True.
If the 'useaadauth' argument is passed, then the OBJECT_ID and IDENTIFIER_URI values are required as well.
''',
help={
"short-summary": "Add receivers to the action group during the creation.",
"long-summary": '''
Usage: --action TYPE NAME [ARG ...]
Email:
Format: --action email NAME EMAIL_ADDRESS [usecommonalertschema]
Example: --action email bob bob@contoso.com
SMS:
Format: --action sms NAME COUNTRY_CODE PHONE_NUMBER
Example: --action sms charli 1 5551234567
Webhook:
Format: --action webhook NAME URI [useaadauth OBJECT_ID IDENTIFIER URI] [usecommonalertschema]
Example: --action webhook alert_hook https://www.contoso.com/alert useaadauth testobj http://identifier usecommonalertschema
Arm Role:
Format: --action armrole NAME ROLE_ID [usecommonalertschema]
Example: --action armole owner_role 8e3af657-a8ff-443c-a75c-2fe8c4bcb635
Azure App Push:
Format: --action azureapppush NAME EMAIL_ADDRESS
Example: --action azureapppush test_apppush bob@contoso.com
ITSM:
Format: --action itsm NAME WORKSPACE_ID CONNECTION_ID TICKET_CONFIGURATION REGION
Example: --action itsm test_itsm test_workspace test_conn ticket_blob useast
Automation runbook:
Format: --action automationrunbook NAME AUTOMATION_ACCOUNT_ID RUNBOOK_NAME WEBHOOK_RESOURCE_ID SERVICE_URI [isglobalrunbook] [usecommonalertschema]
Example: --action automationrunbook test_runbook test_acc test_book test_webhook test_rsrc http://example.com isglobalrunbook usecommonalertschema
Voice:
Format: --action voice NAME COUNTRY_CODE PHONE_NUMBER
Example: --action voice charli 1 4441234567
Logic App:
Format: --action logicapp NAME RESOURCE_ID CALLBACK_URL [usecommonalertschema]
Example: --action logicapp test_logicapp test_rsrc http://callback
Azure Function:
Format: --action azurefunction NAME FUNCTION_APP_RESOURCE_ID FUNCTION_NAME HTTP_TRIGGER_URL [usecommonalertschema]
Example: --action azurefunction test_function test_rsrc test_func http://trigger usecommonalertschema
Event Hub:
Format: --action eventhub NAME SUBSCRIPTION_ID EVENT_HUB_NAME_SPACE EVENT_HUB_NAME [usecommonalertschema]
Example: --action eventhub test_eventhub 5def922a-3ed4-49c1-b9fd-05ec533819a3 eventhubNameSpace testEventHubName usecommonalertschema
Multiple actions can be specified by using more than one `--add-action` argument.
'useaadauth', 'isglobalrunbook' and 'usecommonalertschema' are optional arguements that only need to be passed to set the respective parameter to True.
If the 'useaadauth' argument is passed, then the OBJECT_ID and IDENTIFIER_URI values are required as well.
'''
},
arg_group="Actions",
)
args_schema.receiver_actions.Element = AAZCustomListArg()
Expand Down Expand Up @@ -225,44 +228,48 @@ def _build_arguments_schema(cls, *args, **kwargs):
args_schema.receiver_actions = AAZCustomListArg(
options=["--add-actions"],
singular_options=["--add-action", "-a"],
help="Add receivers to the action group." + '''
Usage: --add-action TYPE NAME [ARG ...]
Email:
Format: --add-action email NAME EMAIL_ADDRESS [usecommonalertschema]
Example: --add-action email bob bob@contoso.com
SMS:
Format: --add-action sms NAME COUNTRY_CODE PHONE_NUMBER
Example: --add-action sms charli 1 5551234567
Webhook:
Format: --add-action webhook NAME URI [useaadauth OBJECT_ID IDENTIFIER URI] [usecommonalertschema]
Example: --add-action https://www.contoso.com/alert useaadauth testobj http://identifier usecommonalertschema
Arm Role:
Format: --add-action armrole NAME ROLE_ID [usecommonalertschema]
Example: --add-action armole owner_role 8e3af657-a8ff-443c-a75c-2fe8c4bcb635
Azure App Push:
Format: --add-action azureapppush NAME EMAIL_ADDRESS
Example: --add-action azureapppush test_apppush bob@contoso.com
ITSM:
Format: --add-action itsm NAME WORKSPACE_ID CONNECTION_ID TICKET_CONFIGURATION REGION
Example: --add-action itsm test_itsm test_workspace test_conn ticket_blob useast
Automation runbook:
Format: --add-action automationrunbook NAME AUTOMATION_ACCOUNT_ID RUNBOOK_NAME WEBHOOK_RESOURCE_ID SERVICE_URI [isglobalrunbook] [usecommonalertschema]
Example: --add-action automationrunbook test_runbook test_acc test_book test_webhook test_rsrc http://example.com isglobalrunbook usecommonalertschema
Voice:
Format: --add-action voice NAME COUNTRY_CODE PHONE_NUMBER
Example: --add-action voice charli 1 4441234567
Logic App:
Format: --add-action logicapp NAME RESOURCE_ID CALLBACK_URL [usecommonalertschema]
Example: --add-action logicapp test_logicapp test_rsrc http://callback
Azure Function:
Format: --add-action azurefunction NAME FUNCTION_APP_RESOURCE_ID FUNCTION_NAME HTTP_TRIGGER_URL [usecommonalertschema]
Example: --add-action azurefunction test_function test_rsrc test_func http://trigger usecommonalertschema
Event Hub:
Format: --action eventhub NAME SUBSCRIPTION_ID EVENT_HUB_NAME_SPACE EVENT_HUB_NAME [usecommonalertschema]
Example: --action eventhub test_eventhub 5def922a-3ed4-49c1-b9fd-05ec533819a3 eventhubNameSpace testEventHubName usecommonalertschema
Multiple actions can be specified by using more than one `--add-action` argument.
'useaadauth', 'isglobalrunbook' and 'usecommonalertschema' are optional arguements that only need to be passed to set the respective parameter to True.
If the 'useaadauth' argument is passed, then the OBJECT_ID and IDENTIFIER_URI values are required as well.''',
help={
"short-summary": "Add receivers to the action group.",
"long-summary": '''
Usage: --add-action TYPE NAME [ARG ...]
Email:
Format: --add-action email NAME EMAIL_ADDRESS [usecommonalertschema]
Example: --add-action email bob bob@contoso.com
SMS:
Format: --add-action sms NAME COUNTRY_CODE PHONE_NUMBER
Example: --add-action sms charli 1 5551234567
Webhook:
Format: --add-action webhook NAME URI [useaadauth OBJECT_ID IDENTIFIER URI] [usecommonalertschema]
Example: --add-action https://www.contoso.com/alert useaadauth testobj http://identifier usecommonalertschema
Arm Role:
Format: --add-action armrole NAME ROLE_ID [usecommonalertschema]
Example: --add-action armole owner_role 8e3af657-a8ff-443c-a75c-2fe8c4bcb635
Azure App Push:
Format: --add-action azureapppush NAME EMAIL_ADDRESS
Example: --add-action azureapppush test_apppush bob@contoso.com
ITSM:
Format: --add-action itsm NAME WORKSPACE_ID CONNECTION_ID TICKET_CONFIGURATION REGION
Example: --add-action itsm test_itsm test_workspace test_conn ticket_blob useast
Automation runbook:
Format: --add-action automationrunbook NAME AUTOMATION_ACCOUNT_ID RUNBOOK_NAME WEBHOOK_RESOURCE_ID SERVICE_URI [isglobalrunbook] [usecommonalertschema]
Example: --add-action automationrunbook test_runbook test_acc test_book test_webhook test_rsrc http://example.com isglobalrunbook usecommonalertschema
Voice:
Format: --add-action voice NAME COUNTRY_CODE PHONE_NUMBER
Example: --add-action voice charli 1 4441234567
Logic App:
Format: --add-action logicapp NAME RESOURCE_ID CALLBACK_URL [usecommonalertschema]
Example: --add-action logicapp test_logicapp test_rsrc http://callback
Azure Function:
Format: --add-action azurefunction NAME FUNCTION_APP_RESOURCE_ID FUNCTION_NAME HTTP_TRIGGER_URL [usecommonalertschema]
Example: --add-action azurefunction test_function test_rsrc test_func http://trigger usecommonalertschema
Event Hub:
Format: --action eventhub NAME SUBSCRIPTION_ID EVENT_HUB_NAME_SPACE EVENT_HUB_NAME [usecommonalertschema]
Example: --action eventhub test_eventhub 5def922a-3ed4-49c1-b9fd-05ec533819a3 eventhubNameSpace testEventHubName usecommonalertschema
Multiple actions can be specified by using more than one `--add-action` argument.
'useaadauth', 'isglobalrunbook' and 'usecommonalertschema' are optional arguements that only need to be passed to set the respective parameter to True.
If the 'useaadauth' argument is passed, then the OBJECT_ID and IDENTIFIER_URI values are required as well.
'''
},
arg_group="Actions",
)
args_schema.receiver_actions.Element = AAZListArg()
Expand Down Expand Up @@ -356,44 +363,48 @@ def _build_arguments_schema(cls, *args, **kwargs):
args_schema.receiver_actions = AAZCustomListArg(
options=["--add-actions"],
singular_options=["--add-action", "-a"],
help="Add receivers to the action group." + '''
Usage: --add-action TYPE NAME [ARG ...]
Email:
Format: --add-action email NAME EMAIL_ADDRESS [usecommonalertschema]
Example: --add-action email bob bob@contoso.com
SMS:
Format: --add-action sms NAME COUNTRY_CODE PHONE_NUMBER
Example: --add-action sms charli 1 5551234567
Webhook:
Format: --add-action webhook NAME URI [useaadauth OBJECT_ID IDENTIFIER URI] [usecommonalertschema]
Example: --add-action https://www.contoso.com/alert useaadauth testobj http://identifier usecommonalertschema
Arm Role:
Format: --add-action armrole NAME ROLE_ID [usecommonalertschema]
Example: --add-action armole owner_role 8e3af657-a8ff-443c-a75c-2fe8c4bcb635
Azure App Push:
Format: --add-action azureapppush NAME EMAIL_ADDRESS
Example: --add-action azureapppush test_apppush bob@contoso.com
ITSM:
Format: --add-action itsm NAME WORKSPACE_ID CONNECTION_ID TICKET_CONFIGURATION REGION
Example: --add-action itsm test_itsm test_workspace test_conn ticket_blob useast
Automation runbook:
Format: --add-action automationrunbook NAME AUTOMATION_ACCOUNT_ID RUNBOOK_NAME WEBHOOK_RESOURCE_ID SERVICE_URI [isglobalrunbook] [usecommonalertschema]
Example: --add-action automationrunbook test_runbook test_acc test_book test_webhook test_rsrc http://example.com isglobalrunbook usecommonalertschema
Voice:
Format: --add-action voice NAME COUNTRY_CODE PHONE_NUMBER
Example: --add-action voice charli 1 4441234567
Logic App:
Format: --add-action logicapp NAME RESOURCE_ID CALLBACK_URL [usecommonalertschema]
Example: --add-action logicapp test_logicapp test_rsrc http://callback
Azure Function:
Format: --add-action azurefunction NAME FUNCTION_APP_RESOURCE_ID FUNCTION_NAME HTTP_TRIGGER_URL [usecommonalertschema]
Example: --add-action azurefunction test_function test_rsrc test_func http://trigger usecommonalertschema
Event Hub:
Format: --action eventhub NAME SUBSCRIPTION_ID EVENT_HUB_NAME_SPACE EVENT_HUB_NAME [usecommonalertschema]
Example: --action eventhub test_eventhub 5def922a-3ed4-49c1-b9fd-05ec533819a3 eventhubNameSpace testEventHubName usecommonalertschema
Multiple actions can be specified by using more than one `--add-action` argument.
'useaadauth', 'isglobalrunbook' and 'usecommonalertschema' are optional arguements that only need to be passed to set the respective parameter to True.
If the 'useaadauth' argument is passed, then the OBJECT_ID and IDENTIFIER_URI values are required as well.''',
help={
"short-summary": "Add receivers to the action group.",
"long-summary": '''
Usage: --add-action TYPE NAME [ARG ...]
Email:
Format: --add-action email NAME EMAIL_ADDRESS [usecommonalertschema]
Example: --add-action email bob bob@contoso.com
SMS:
Format: --add-action sms NAME COUNTRY_CODE PHONE_NUMBER
Example: --add-action sms charli 1 5551234567
Webhook:
Format: --add-action webhook NAME URI [useaadauth OBJECT_ID IDENTIFIER URI] [usecommonalertschema]
Example: --add-action https://www.contoso.com/alert useaadauth testobj http://identifier usecommonalertschema
Arm Role:
Format: --add-action armrole NAME ROLE_ID [usecommonalertschema]
Example: --add-action armole owner_role 8e3af657-a8ff-443c-a75c-2fe8c4bcb635
Azure App Push:
Format: --add-action azureapppush NAME EMAIL_ADDRESS
Example: --add-action azureapppush test_apppush bob@contoso.com
ITSM:
Format: --add-action itsm NAME WORKSPACE_ID CONNECTION_ID TICKET_CONFIGURATION REGION
Example: --add-action itsm test_itsm test_workspace test_conn ticket_blob useast
Automation runbook:
Format: --add-action automationrunbook NAME AUTOMATION_ACCOUNT_ID RUNBOOK_NAME WEBHOOK_RESOURCE_ID SERVICE_URI [isglobalrunbook] [usecommonalertschema]
Example: --add-action automationrunbook test_runbook test_acc test_book test_webhook test_rsrc http://example.com isglobalrunbook usecommonalertschema
Voice:
Format: --add-action voice NAME COUNTRY_CODE PHONE_NUMBER
Example: --add-action voice charli 1 4441234567
Logic App:
Format: --add-action logicapp NAME RESOURCE_ID CALLBACK_URL [usecommonalertschema]
Example: --add-action logicapp test_logicapp test_rsrc http://callback
Azure Function:
Format: --add-action azurefunction NAME FUNCTION_APP_RESOURCE_ID FUNCTION_NAME HTTP_TRIGGER_URL [usecommonalertschema]
Example: --add-action azurefunction test_function test_rsrc test_func http://trigger usecommonalertschema
Event Hub:
Format: --action eventhub NAME SUBSCRIPTION_ID EVENT_HUB_NAME_SPACE EVENT_HUB_NAME [usecommonalertschema]
Example: --action eventhub test_eventhub 5def922a-3ed4-49c1-b9fd-05ec533819a3 eventhubNameSpace testEventHubName usecommonalertschema
Multiple actions can be specified by using more than one `--add-action` argument.
'useaadauth', 'isglobalrunbook' and 'usecommonalertschema' are optional arguements that only need to be passed to set the respective parameter to True.
If the 'useaadauth' argument is passed, then the OBJECT_ID and IDENTIFIER_URI values are required as well.
'''
}
)
args_schema.receiver_actions.Element = AAZListArg()
args_schema.receiver_actions.Element.Element = AAZStrArg()
Expand Down
Loading
Loading