{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-cli/pulls/comments/74476306","id":74476306,"diff_hunk":"@@ -46,6 +46,18 @@\n register_cli_argument('resource feature list', 'resource_provider_namespace', CliArgumentType(options_list=('--namespace',), required=False, help=_PROVIDER_HELP_TEXT))\n register_cli_argument('resource feature', 'feature_name', CliArgumentType(options_list=('--name', '-n'), help='the feature name'))\n \n+register_cli_argument('resource policy', 'resource_group_name', arg_type=resource_group_name_type, completer=get_resource_group_completion_list)","path":"src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py","position":19,"original_position":19,"commit_id":"75b2bf20f43a62cbe7c35617147184474bcf9726","original_commit_id":"75b2bf20f43a62cbe7c35617147184474bcf9726","user":{"login":"tjprescott","id":5723682,"avatar_url":"https://avatars.githubusercontent.com/u/5723682?v=3","gravatar_id":"","url":"https://api.github.com/users/tjprescott","html_url":"https://github.com/tjprescott","followers_url":"https://api.github.com/users/tjprescott/followers","following_url":"https://api.github.com/users/tjprescott/following{/other_user}","gists_url":"https://api.github.com/users/tjprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/tjprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjprescott/subscriptions","organizations_url":"https://api.github.com/users/tjprescott/orgs","repos_url":"https://api.github.com/users/tjprescott/repos","events_url":"https://api.github.com/users/tjprescott/events{/privacy}","received_events_url":"https://api.github.com/users/tjprescott/received_events","type":"User","site_admin":false},"body":"This should not be required. 'resource_group_name' is globally aliased.","created_at":"2016-08-11T18:26:37Z","updated_at":"2016-08-11T18:26:37Z","html_url":"https://github.com/Azure/azure-cli/pull/683#discussion_r74476306","pull_request_url":"https://api.github.com/repos/Azure/azure-cli/pulls/683","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/comments/74476306"},"html":{"href":"https://github.com/Azure/azure-cli/pull/683#discussion_r74476306"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/683"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-cli/pulls/683","id":80995847,"html_url":"https://github.com/Azure/azure-cli/pull/683","diff_url":"https://github.com/Azure/azure-cli/pull/683.diff","patch_url":"https://github.com/Azure/azure-cli/pull/683.patch","issue_url":"https://api.github.com/repos/Azure/azure-cli/issues/683","number":683,"state":"open","locked":false,"title":"resource policy: create/delete/show/list for defintions and assignments","user":{"login":"yugangw-msft","id":6014209,"avatar_url":"https://avatars.githubusercontent.com/u/6014209?v=3","gravatar_id":"","url":"https://api.github.com/users/yugangw-msft","html_url":"https://github.com/yugangw-msft","followers_url":"https://api.github.com/users/yugangw-msft/followers","following_url":"https://api.github.com/users/yugangw-msft/following{/other_user}","gists_url":"https://api.github.com/users/yugangw-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/yugangw-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugangw-msft/subscriptions","organizations_url":"https://api.github.com/users/yugangw-msft/orgs","repos_url":"https://api.github.com/users/yugangw-msft/repos","events_url":"https://api.github.com/users/yugangw-msft/events{/privacy}","received_events_url":"https://api.github.com/users/yugangw-msft/received_events","type":"User","site_admin":false},"body":"```\r\nCommand\r\n    az resource policy create: Create a policy.\r\n\r\nArguments\r\n    --name -n [Required]: Name of policy definition.\r\n    --rules   [Required]: JSON formatted string or a path to a file with such content.\r\n    --description       : Description of policy definition.\r\n    --display-name      : Display name of policy definition.\r\n\r\nExamples\r\n    Create a policy with following rules\r\n        {\r\n            \"if\":\r\n            {\r\n                \"source\": \"action\",\r\n                \"equals\": \"Microsoft.Storage/storageAccounts/write\"\r\n            },\r\n            \"then\":\r\n            {\r\n                \"effect\": \"deny\"\r\n            }\r\n        }\r\n\r\n\r\nCommand\r\n    az resource policy delete\r\n\r\nArguments\r\n    --name -n [Required]: Name of policy definition.\r\n\r\n\r\nCommand\r\n    az resource policy list\r\n\r\nArguments\r\n    --filter   : The filter to apply on the operation.\r\n\r\n\r\nCommand\r\n    az resource policy show\r\n\r\nArguments\r\n    --name -n [Required]: Name of policy definition.\r\n\r\n\r\nCommand\r\n    az resource policy assignment create\r\n\r\nArguments\r\n    --policy [Required]: Policy name or fully qualified id.\r\n    --display-name     : Display name of the assignment.\r\n    --name -n          : Name of the assignment.\r\n    --resource-group -g: Name of resource group.\r\n    --resource-id      : Id of the associated resource.\r\n\r\n\r\nCommand\r\n    az resource policy assignment show\r\n\r\nArguments\r\n    --name -n [Required]: Name of the assignment.\r\n    --resource-group -g : Name of resource group.\r\n    --resource-id       : Id of the associated resource.\r\n\r\n\r\nCommand\r\n    az resource policy assignment list\r\n\r\nArguments\r\n    --include-inherited: Show assignments from parent scopes.\r\n    --resource-group -g: Name of resource group.\r\n    --resource-id      : Id of the associated resource.\r\n    --show-all         : Show all the assignment under the current subscription.\r\n\r\n\r\nCommand\r\n    az resource policy assignment delete\r\n\r\nArguments\r\n    --name -n [Required]: Name of the assignment.\r\n    --resource-group -g : Name of resource group.\r\n    --resource-id       : Id of the associated resource.\r\n\r\n```","created_at":"2016-08-11T17:19:22Z","updated_at":"2016-08-11T18:26:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca7ef7b8d399d7ef40424d70ceda3f001ff2704b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-cli/pulls/683/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-cli/pulls/683/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-cli/issues/683/comments","statuses_url":"https://api.github.com/repos/Azure/azure-cli/statuses/75b2bf20f43a62cbe7c35617147184474bcf9726","head":{"label":"yugangw-msft:policy","ref":"policy","sha":"75b2bf20f43a62cbe7c35617147184474bcf9726","user":{"login":"yugangw-msft","id":6014209,"avatar_url":"https://avatars.githubusercontent.com/u/6014209?v=3","gravatar_id":"","url":"https://api.github.com/users/yugangw-msft","html_url":"https://github.com/yugangw-msft","followers_url":"https://api.github.com/users/yugangw-msft/followers","following_url":"https://api.github.com/users/yugangw-msft/following{/other_user}","gists_url":"https://api.github.com/users/yugangw-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/yugangw-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugangw-msft/subscriptions","organizations_url":"https://api.github.com/users/yugangw-msft/orgs","repos_url":"https://api.github.com/users/yugangw-msft/repos","events_url":"https://api.github.com/users/yugangw-msft/events{/privacy}","received_events_url":"https://api.github.com/users/yugangw-msft/received_events","type":"User","site_admin":false},"repo":{"id":64246644,"name":"azure-cli","full_name":"yugangw-msft/azure-cli","owner":{"login":"yugangw-msft","id":6014209,"avatar_url":"https://avatars.githubusercontent.com/u/6014209?v=3","gravatar_id":"","url":"https://api.github.com/users/yugangw-msft","html_url":"https://github.com/yugangw-msft","followers_url":"https://api.github.com/users/yugangw-msft/followers","following_url":"https://api.github.com/users/yugangw-msft/following{/other_user}","gists_url":"https://api.github.com/users/yugangw-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/yugangw-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugangw-msft/subscriptions","organizations_url":"https://api.github.com/users/yugangw-msft/orgs","repos_url":"https://api.github.com/users/yugangw-msft/repos","events_url":"https://api.github.com/users/yugangw-msft/events{/privacy}","received_events_url":"https://api.github.com/users/yugangw-msft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yugangw-msft/azure-cli","description":"Command-line tools for Azure.","fork":true,"url":"https://api.github.com/repos/yugangw-msft/azure-cli","forks_url":"https://api.github.com/repos/yugangw-msft/azure-cli/forks","keys_url":"https://api.github.com/repos/yugangw-msft/azure-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yugangw-msft/azure-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yugangw-msft/azure-cli/teams","hooks_url":"https://api.github.com/repos/yugangw-msft/azure-cli/hooks","issue_events_url":"https://api.github.com/repos/yugangw-msft/azure-cli/issues/events{/number}","events_url":"https://api.github.com/repos/yugangw-msft/azure-cli/events","assignees_url":"https://api.github.com/repos/yugangw-msft/azure-cli/assignees{/user}","branches_url":"https://api.github.com/repos/yugangw-msft/azure-cli/branches{/branch}","tags_url":"https://api.github.com/repos/yugangw-msft/azure-cli/tags","blobs_url":"https://api.github.com/repos/yugangw-msft/azure-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yugangw-msft/azure-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yugangw-msft/azure-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/yugangw-msft/azure-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yugangw-msft/azure-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/yugangw-msft/azure-cli/languages","stargazers_url":"https://api.github.com/repos/yugangw-msft/azure-cli/stargazers","contributors_url":"https://api.github.com/repos/yugangw-msft/azure-cli/contributors","subscribers_url":"https://api.github.com/repos/yugangw-msft/azure-cli/subscribers","subscription_url":"https://api.github.com/repos/yugangw-msft/azure-cli/subscription","commits_url":"https://api.github.com/repos/yugangw-msft/azure-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/yugangw-msft/azure-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/yugangw-msft/azure-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/yugangw-msft/azure-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/yugangw-msft/azure-cli/contents/{+path}","compare_url":"https://api.github.com/repos/yugangw-msft/azure-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yugangw-msft/azure-cli/merges","archive_url":"https://api.github.com/repos/yugangw-msft/azure-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yugangw-msft/azure-cli/downloads","issues_url":"https://api.github.com/repos/yugangw-msft/azure-cli/issues{/number}","pulls_url":"https://api.github.com/repos/yugangw-msft/azure-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/yugangw-msft/azure-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/yugangw-msft/azure-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yugangw-msft/azure-cli/labels{/name}","releases_url":"https://api.github.com/repos/yugangw-msft/azure-cli/releases{/id}","deployments_url":"https://api.github.com/repos/yugangw-msft/azure-cli/deployments","created_at":"2016-07-26T18:58:36Z","updated_at":"2016-07-26T18:58:39Z","pushed_at":"2016-08-11T17:40:21Z","git_url":"git://github.com/yugangw-msft/azure-cli.git","ssh_url":"git@github.com:yugangw-msft/azure-cli.git","clone_url":"https://github.com/yugangw-msft/azure-cli.git","svn_url":"https://github.com/yugangw-msft/azure-cli","homepage":null,"size":5873,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"625f3e607b5a4a0ff8235de7a9e0c68f2277302c","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":51040886,"name":"azure-cli","full_name":"Azure/azure-cli","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-cli","description":"Command-line tools for Azure.","fork":false,"url":"https://api.github.com/repos/Azure/azure-cli","forks_url":"https://api.github.com/repos/Azure/azure-cli/forks","keys_url":"https://api.github.com/repos/Azure/azure-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-cli/teams","hooks_url":"https://api.github.com/repos/Azure/azure-cli/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-cli/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-cli/events","assignees_url":"https://api.github.com/repos/Azure/azure-cli/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-cli/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-cli/tags","blobs_url":"https://api.github.com/repos/Azure/azure-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-cli/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-cli/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-cli/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-cli/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-cli/subscription","commits_url":"https://api.github.com/repos/Azure/azure-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-cli/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-cli/merges","archive_url":"https://api.github.com/repos/Azure/azure-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-cli/downloads","issues_url":"https://api.github.com/repos/Azure/azure-cli/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-cli/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-cli/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-cli/deployments","created_at":"2016-02-04T00:21:51Z","updated_at":"2016-08-11T16:26:08Z","pushed_at":"2016-08-11T17:40:22Z","git_url":"git://github.com/Azure/azure-cli.git","ssh_url":"git@github.com:Azure/azure-cli.git","clone_url":"https://github.com/Azure/azure-cli.git","svn_url":"https://github.com/Azure/azure-cli","homepage":null,"size":8735,"stargazers_count":20,"watchers_count":20,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":123,"forks":11,"open_issues":123,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/683"},"html":{"href":"https://github.com/Azure/azure-cli/pull/683"},"issue":{"href":"https://api.github.com/repos/Azure/azure-cli/issues/683"},"comments":{"href":"https://api.github.com/repos/Azure/azure-cli/issues/683/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/683/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/683/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-cli/statuses/75b2bf20f43a62cbe7c35617147184474bcf9726"}}}}
{"actor":{"display_login":"tjprescott"}}