Skip to content

Commit

Permalink
refine the format for help and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jsntcy committed May 8, 2020
1 parent 635e564 commit ed025bf
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 87 deletions.
37 changes: 12 additions & 25 deletions src/custom-providers/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Azure CLI Custom Providers Extension #
# Azure CLI Custom Providers Extension
This is a extension for Custom Providers features.

### How to use ###
### How to use
Install this extension using the below CLI command
```
az extension add --name custom-providers
Expand All @@ -11,46 +11,33 @@ az extension add --name custom-providers
#### Manage custom resource provider:


##### Create or update a custom resource provider.
##### Create or update a custom resource provider

```
az custom-providers resource-provider create \
-n MyRP \
-g MyRG \
--action name=ping endpoint=https://test.azurewebsites.net/api routing_type=Proxy \
--resource-type name=users endpoint=https://test.azurewebsites.net/api routing_type="Proxy, Cache" \
--validation validation_type=swagger specification=https://raw.githubusercontent.com/test.json
az custom-providers resource-provider create -n MyRP -g MyRG --action name=ping endpoint=https://test.azurewebsites.net/api routing_type=Proxy --resource-type name=users endpoint=https://test.azurewebsites.net/api routing_type="Proxy, Cache" --validation validation_type=swagger specification=https://raw.githubusercontent.com/test.json
```

##### Update the tags for a custom resource provider..
##### Update the tags for a custom resource provider
```
az custom-providers resource-provider update \
-g MyRG \
-n MyRP \
--tags a=b
az custom-providers resource-provider update -g MyRG -n MyRP --tags a=b
```

##### Get a custom resource provider.
##### Get a custom resource provider
```
az custom-providers resource-provider show \
-g MyRG \
-n MyRP
az custom-providers resource-provider show -g MyRG -n MyRP
```

##### Get all the custom resource providers within a resource group or in the current subscription.
##### Get all the custom resource providers within a resource group or in the current subscription
```
az custom-providers resource-provider list
```
```
az custom-providers resource-provider list \
-g MyRG
az custom-providers resource-provider list -g MyRG
```

##### Delete a custom resource provider..
##### Delete a custom resource provider
```
az custom-providers resource-provider delete \
-g MyRG \
-n MyRP
az custom-providers resource-provider delete -g MyRG -n MyRP
```

If you have issues, please give feedback by opening an issue at https://github.com/Azure/azure-cli-extensions/issues.
124 changes: 62 additions & 62 deletions src/custom-providers/azext_custom_providers/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,87 +10,87 @@


helps['custom-providers resource-provider'] = """
type: group
short-summary: Commands to manage custom resource provider.
type: group
short-summary: Commands to manage custom resource provider.
"""

helps['custom-providers resource-provider create'] = """
type: command
short-summary: Create or update the custom resource provider.
parameters:
- name: --action -a
short-summary: Add an action to the custom resource provider.
long-summary: |
Usage: --action name=ping endpoint="https://test.azurewebsites.net/api/{requestPath}" routing_type=Proxy
type: command
short-summary: Create or update the custom resource provider.
parameters:
- name: --action -a
short-summary: Add an action to the custom resource provider.
long-summary: |
Usage: --action name=ping endpoint="https://test.azurewebsites.net/api/{requestPath}" routing_type=Proxy
name: Required. The name of the action.
endpoint: Required. The endpoint URI that the custom resource provider will proxy requests to.
routing_type: The routing types that are supported for action requests. Possible values include: 'Proxy'.
name: Required. The name of the action.
endpoint: Required. The endpoint URI that the custom resource provider will proxy requests to.
routing_type: The routing types that are supported for action requests. Possible values include: 'Proxy'.
Multiple actions can be specified by using more than one `--action` argument.
- name: --resource-type -r
short-summary: Add a custom resource type to the custom resource provider.
long-summary: |
Usage: --resource-type name=user endpoint="https://test.azurewebsites.net/api/{requestPath}" routing_type="Proxy, Cache"
Multiple actions can be specified by using more than one `--action` argument.
- name: --resource-type -r
short-summary: Add a custom resource type to the custom resource provider.
long-summary: |
Usage: --resource-type name=user endpoint="https://test.azurewebsites.net/api/{requestPath}" routing_type="Proxy, Cache"
name: Required. The name of the resource type.
endpoint: Required. The endpoint URI that the custom resource provider will proxy requests to.
routing_type: The routing types that are supported for resource requests. Possible values include: 'Proxy', 'Proxy,Cache'.
name: Required. The name of the resource type.
endpoint: Required. The endpoint URI that the custom resource provider will proxy requests to.
routing_type: The routing types that are supported for resource requests. Possible values include: 'Proxy', 'Proxy,Cache'.
Multiple resource types can be specified by using more than one `--resource-type` argument.
- name: --validation -v
short-summary: Add a validation to the custom resource provider.
long-summary: |
Usage: --validation specification="https://raw.githubusercontent.com/" validation_type="Swagger"
Multiple resource types can be specified by using more than one `--resource-type` argument.
- name: --validation -v
short-summary: Add a validation to the custom resource provider.
long-summary: |
Usage: --validation specification="https://raw.githubusercontent.com/" validation_type="Swagger"
specification: A link to the validation specification.vThe specification must be hosted on raw.githubusercontent.com.
validation_type: The type of validation to run against a matching request. Possible values include: 'Swagger'.
specification: A link to the validation specification.vThe specification must be hosted on raw.githubusercontent.com.
validation_type: The type of validation to run against a matching request. Possible values include: 'Swagger'.
Multiple validations can be specified by using more than one `--validation` argument.
examples:
- name: Create or update a custom resource provider.
text: |-
az custom-providers resource-provider create -n MyRP -g MyRG \\
--action name=ping endpoint=https://test.azurewebsites.net/api routing_type=Proxy \\
--resource-type name=users endpoint=https://test.azurewebsites.net/api routing_type="Proxy, Cache" \\
--validation validation_type=swagger specification=https://raw.githubusercontent.com/test.json
Multiple validations can be specified by using more than one `--validation` argument.
examples:
- name: Create or update a custom resource provider.
text: |-
az custom-providers resource-provider create -n MyRP -g MyRG \\
--action name=ping endpoint=https://test.azurewebsites.net/api routing_type=Proxy \\
--resource-type name=users endpoint=https://test.azurewebsites.net/api routing_type="Proxy, Cache" \\
--validation validation_type=swagger specification=https://raw.githubusercontent.com/test.json
"""

helps['custom-providers resource-provider update'] = """
type: command
short-summary: Update the custom resource provider. Only tags can be updated.
examples:
- name: Update the tags for a custom resource provider.
text: |-
az custom-providers resource-provider update -g MyRG -n MyRP --tags a=b
type: command
short-summary: Update the custom resource provider. Only tags can be updated.
examples:
- name: Update the tags for a custom resource provider.
text: |-
az custom-providers resource-provider update -g MyRG -n MyRP --tags a=b
"""

helps['custom-providers resource-provider delete'] = """
type: command
short-summary: Delete the custom resource provider.
examples:
- name: Delete a custom resource provider.
text: |-
az custom-providers resource-provider delete -g MyRG -n MyRP
type: command
short-summary: Delete the custom resource provider.
examples:
- name: Delete a custom resource provider.
text: |-
az custom-providers resource-provider delete -g MyRG -n MyRP
"""

helps['custom-providers resource-provider show'] = """
type: command
short-summary: Get the properties for the custom resource provider.
examples:
- name: Get a custom resource provider.
text: |-
az custom-providers resource-provider show -g MyRG -n MyRP
type: command
short-summary: Get the properties for the custom resource provider.
examples:
- name: Get a custom resource provider.
text: |-
az custom-providers resource-provider show -g MyRG -n MyRP
"""

helps['custom-providers resource-provider list'] = """
type: command
short-summary: Get all the custom resource providers within a resource group or in the current subscription.
examples:
- name: List all custom resource providers in the resource group.
text: |-
az custom-providers resource-provider list -g MyRG
- name: List all custom resource providers in the current subscription.
text: |-
az custom-providers resource-provider list
type: command
short-summary: Get all the custom resource providers within a resource group or in the current subscription.
examples:
- name: List all custom resource providers in the resource group.
text: |-
az custom-providers resource-provider list -g MyRG
- name: List all custom resource providers in the current subscription.
text: |-
az custom-providers resource-provider list
"""

0 comments on commit ed025bf

Please sign in to comment.