Skip to content
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
4 changes: 2 additions & 2 deletions src/automanage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is an extension to Azure CLI to manage Automanage resources.
## How to use ##
# configuration-profile
Create a configuration-profile
`az automanage configuration-profile create -n {profile_name} -g {rg} --configuration {"Antimalware/Enable":false,"Backup/Enable":false,"VMInsights/Enable":true,"AzureSecurityCenter/Enable":true,"UpdateManagement/Enable":true,"ChangeTrackingAndInventory/Enable":true,"GuestConfiguration/Enable":true,"LogAnalytics/Enable":true,"BootDiagnostics/Enable":true}`
`az automanage configuration-profile create -n {profile_name} -g {rg} --configuration '{"Antimalware/Enable":false,"Backup/Enable":false,"VMInsights/Enable":true,"AzureSecurityCenter/Enable":true,"UpdateManagement/Enable":true,"ChangeTrackingAndInventory/Enable":true,"GuestConfiguration/Enable":true,"LogAnalytics/Enable":true,"BootDiagnostics/Enable":true}'`

Show a configuration-profile
`az automanage configuration-profile show -n {profile_name} -g {rg}`

Update a configuration-profile
`az automanage configuration-profile update -n {profile_name} -g {rg} --configuration {"Antimalware/Enable":true,"VMInsights/Enable":false}`
`az automanage configuration-profile update -n {profile_name} -g {rg} --configuration '{"Antimalware/Enable":true,"VMInsights/Enable":false}'`

List configuration-profiles
`az automanage configuration-profile list -g {rg}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Create(AAZCommand):
"""Create a configuration profile

:example: create configuration-profile
az automanage configuration-profile create -n {profile_name} -g {rg} --configuration {"Antimalware/Enable":false,"Backup/Enable":false,"VMInsights/Enable":true,"AzureSecurityCenter/Enable":true,"UpdateManagement/Enable":true,"ChangeTrackingAndInventory/Enable":true,"GuestConfiguration/Enable":true,"LogAnalytics/Enable":true,"BootDiagnostics/Enable":true}
az automanage configuration-profile create -n {profile_name} -g {rg} --configuration '{"Antimalware/Enable":false,"Backup/Enable":false,"VMInsights/Enable":true,"AzureSecurityCenter/Enable":true,"UpdateManagement/Enable":true,"ChangeTrackingAndInventory/Enable":true,"GuestConfiguration/Enable":true,"LogAnalytics/Enable":true,"BootDiagnostics/Enable":true}'
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Update(AAZCommand):
"""Update a configuration profile

:example: update configuration-profile
az automanage configuration-profile update -n {profile_name} -g {rg} --configuration {"Antimalware/Enable":true,"VMInsights/Enable":false}
az automanage configuration-profile update -n {profile_name} -g {rg} --configuration '{"Antimalware/Enable":true,"VMInsights/Enable":false}'
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Create(AAZCommand):
"""Create a configuration profile version

:example: create configuration-profile version
az automanage configuration-profile version create --profile-name {profile_name} -g {rg} -n {version_name} --configuration {"Antimalware/Enable":false}
az automanage configuration-profile version create --profile-name {profile_name} -g {rg} -n {version_name} --configuration '{"Antimalware/Enable":false}'
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Update(AAZCommand):
"""Update a configuration profile version

:example: update configuration-profile version
az automanage configuration-profile version update --profile-name {profile_name} -g {rg} -n {version_name} --configuration {"Antimalware/Enable":true}
az automanage configuration-profile version update --profile-name {profile_name} -g {rg} -n {version_name} --configuration '{"Antimalware/Enable":true}'
"""

_aaz_info = {
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 20 Jan 2023 06:13:52 GMT
- Fri, 03 Feb 2023 03:46:21 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -73,7 +73,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 20 Jan 2023 06:13:53 GMT
- Fri, 03 Feb 2023 03:46:21 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -121,7 +121,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 20 Jan 2023 06:13:54 GMT
- Fri, 03 Feb 2023 03:46:22 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -169,7 +169,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 20 Jan 2023 06:13:54 GMT
- Fri, 03 Feb 2023 03:46:22 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -215,7 +215,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 20 Jan 2023 06:13:55 GMT
- Fri, 03 Feb 2023 03:46:23 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -252,16 +252,16 @@ interactions:
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Automanage/servicePrincipals/default?api-version=2022-05-04
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Automanage/servicePrincipals/default","name":"default","type":"Microsoft.Automanage/servicePrincipals","properties":{"authorizationSet":true,"servicePrincipalId":"9c649736-fc13-44c4-a4af-9947c6a203e4"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Automanage/servicePrincipals/default","name":"default","type":"Microsoft.Automanage/servicePrincipals","properties":{"authorizationSet":false,"servicePrincipalId":"f76e2cfd-0948-4cd7-bc92-937a6fd5f280"}}'
headers:
cache-control:
- no-cache
content-length:
- '281'
- '282'
content-type:
- application/json; charset=utf-8
date:
- Fri, 20 Jan 2023 06:13:57 GMT
- Fri, 03 Feb 2023 03:46:24 GMT
expires:
- '-1'
pragma:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def test_automanage_configuration_profile_assignment_vm_scenarios(self):
profile_id = self.cmd('az automanage configuration-profile create -n {profile_name} -g {rg} '
'--configuration {{\\\"Antimalware/Enable\\\":true}}').get_output_in_json()["id"]
self.kwargs.update({'profile_id': profile_id})
vm_id = self.cmd('az vm create -n {vm_name} -g {rg} --image UbuntuLTS --generate-ssh-keys').get_output_in_json()["id"]
vm_id = self.cmd('az vm create -n {vm_name} -g {rg} --image UbuntuLTS --generate-ssh-keys '
'--public-ip-sku Standard').get_output_in_json()["id"]
self.cmd('az automanage configuration-profile-assignment vm create -n default -g {rg} '
'--vm-name {vm_name} --configuration-profile {profile_id}')
self.cmd('az automanage configuration-profile-assignment vm show -n default -g {rg} --vm-name {vm_name}',
Expand Down