-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Planetary Computer CLI extension #9737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| .. :changelog: | ||
|
|
||
| Release History | ||
| =============== | ||
|
|
||
| 1.0.0b1 | ||
| ++++++ | ||
| * Initial release. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,47 @@ | ||||||||||||||||||||||||||||||
| # Azure CLI Planetarycomputer Extension # | ||||||||||||||||||||||||||||||
| This is an extension to Azure CLI to manage Planetary Computer GeoCatalog resources. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## How to use ## | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ### Install the extension ### | ||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||
| az extension add --name planetarycomputer | ||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ### Commands ### | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| #### GeoCatalog Management #### | ||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||
| # Create a GeoCatalog | ||||||||||||||||||||||||||||||
| az planetarycomputer geocatalog create -g MyResourceGroup -n MyCatalog -l eastus | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Show a GeoCatalog | ||||||||||||||||||||||||||||||
| az planetarycomputer geocatalog show -g MyResourceGroup -n MyCatalog | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # List GeoCatalogs in a resource group | ||||||||||||||||||||||||||||||
| az planetarycomputer geocatalog list -g MyResourceGroup | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # List all GeoCatalogs in a subscription | ||||||||||||||||||||||||||||||
| az planetarycomputer geocatalog list | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Update tags on a GeoCatalog | ||||||||||||||||||||||||||||||
| az planetarycomputer geocatalog update -g MyResourceGroup -n MyCatalog --tags env=prod | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Delete a GeoCatalog | ||||||||||||||||||||||||||||||
| az planetarycomputer geocatalog delete -g MyResourceGroup -n MyCatalog | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Wait for a GeoCatalog to reach a desired state | ||||||||||||||||||||||||||||||
| az planetarycomputer geocatalog wait -g MyResourceGroup -n MyCatalog --created | ||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| #### GeoCatalog Identity Management #### | ||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||
| # Assign a user-assigned managed identity | ||||||||||||||||||||||||||||||
| az planetarycomputer geocatalog identity assign -g MyResourceGroup -n MyCatalog --user-assigned MyIdentity | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Show identity information | ||||||||||||||||||||||||||||||
| az planetarycomputer geocatalog identity show -g MyResourceGroup -n MyCatalog | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Remove a user-assigned managed identity | ||||||||||||||||||||||||||||||
| az planetarycomputer geocatalog identity remove -g MyResourceGroup -n MyCatalog --user-assigned MyIdentity | ||||||||||||||||||||||||||||||
|
Comment on lines
+40
to
+46
|
||||||||||||||||||||||||||||||
| az planetarycomputer geocatalog identity assign -g MyResourceGroup -n MyCatalog --user-assigned MyIdentity | |
| # Show identity information | |
| az planetarycomputer geocatalog identity show -g MyResourceGroup -n MyCatalog | |
| # Remove a user-assigned managed identity | |
| az planetarycomputer geocatalog identity remove -g MyResourceGroup -n MyCatalog --user-assigned MyIdentity | |
| az planetarycomputer geocatalog identity assign -g MyResourceGroup -n MyCatalog --user-assigned /subscriptions/<subscription-id>/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyIdentity | |
| # Show identity information | |
| az planetarycomputer geocatalog identity show -g MyResourceGroup -n MyCatalog | |
| # Remove a user-assigned managed identity | |
| az planetarycomputer geocatalog identity remove -g MyResourceGroup -n MyCatalog --user-assigned /subscriptions/<subscription-id>/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyIdentity |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| from azure.cli.core import AzCommandsLoader | ||
| from azext_planetarycomputer._help import helps # pylint: disable=unused-import | ||
|
|
||
|
|
||
| class PlanetarycomputerCommandsLoader(AzCommandsLoader): | ||
|
|
||
| def __init__(self, cli_ctx=None): | ||
| from azure.cli.core.commands import CliCommandType | ||
| custom_command_type = CliCommandType( | ||
| operations_tmpl='azext_planetarycomputer.custom#{}') | ||
| super().__init__(cli_ctx=cli_ctx, | ||
| custom_command_type=custom_command_type) | ||
|
|
||
| def load_command_table(self, args): | ||
| from azext_planetarycomputer.commands import load_command_table | ||
| from azure.cli.core.aaz import load_aaz_command_table | ||
| try: | ||
| from . import aaz | ||
| except ImportError: | ||
| aaz = None | ||
| if aaz: | ||
| load_aaz_command_table( | ||
| loader=self, | ||
| aaz_pkg_name=aaz.__name__, | ||
| args=args | ||
| ) | ||
| load_command_table(self, args) | ||
| return self.command_table | ||
|
|
||
| def load_arguments(self, command): | ||
| from azext_planetarycomputer._params import load_arguments | ||
| load_arguments(self, command) | ||
|
|
||
|
|
||
| COMMAND_LOADER_CLS = PlanetarycomputerCommandsLoader |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: disable=line-too-long | ||
| # pylint: disable=too-many-lines | ||
|
|
||
| from knack.help_files import helps # pylint: disable=unused-import | ||
|
|
||
| helps['planetarycomputer'] = """ | ||
| type: group | ||
| short-summary: Manage Planetary Computer resources. | ||
| """ | ||
|
|
||
| helps['planetarycomputer geocatalog'] = """ | ||
| type: group | ||
| short-summary: Manage Planetary Computer GeoCatalog resources. | ||
| """ | ||
|
|
||
| helps['planetarycomputer geocatalog create'] = """ | ||
| type: command | ||
| short-summary: Create a GeoCatalog. | ||
| examples: | ||
| - name: Create a GeoCatalog with default settings | ||
| text: |- | ||
| az planetarycomputer geocatalog create -g MyResourceGroup -n MyCatalog -l eastus | ||
| - name: Create a GeoCatalog with a user-assigned identity | ||
| text: |- | ||
| az planetarycomputer geocatalog create -g MyResourceGroup -n MyCatalog -l eastus \\ | ||
| --user-assigned "/subscriptions/{sub}/resourcegroups/{rg}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{name}" | ||
| """ | ||
|
Comment on lines
+28
to
+34
|
||
|
|
||
| helps['planetarycomputer geocatalog update'] = """ | ||
| type: command | ||
| short-summary: Update a GeoCatalog. | ||
| examples: | ||
| - name: Update tags on a GeoCatalog | ||
| text: |- | ||
| az planetarycomputer geocatalog update -g MyResourceGroup -n MyCatalog --tags env=prod team=platform | ||
| """ | ||
|
|
||
| helps['planetarycomputer geocatalog identity'] = """ | ||
| type: group | ||
| short-summary: Manage identities for a Planetary Computer GeoCatalog. | ||
| """ | ||
|
|
||
| helps['planetarycomputer geocatalog identity assign'] = """ | ||
| type: command | ||
| short-summary: Assign an identity to a GeoCatalog. | ||
| examples: | ||
| - name: Assign a user-assigned managed identity | ||
| text: |- | ||
| az planetarycomputer geocatalog identity assign -g MyResourceGroup -n MyCatalog \\ | ||
| --user-assigned "/subscriptions/{sub}/resourcegroups/{rg}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{name}" | ||
| """ | ||
|
Comment on lines
+53
to
+58
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: disable=too-many-lines | ||
| # pylint: disable=too-many-statements | ||
|
|
||
|
|
||
| def load_arguments(self, _): # pylint: disable=unused-argument | ||
| pass |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from azure.cli.core.aaz import * | ||
|
|
||
|
|
||
| @register_command_group( | ||
| "planetarycomputer", | ||
| ) | ||
| class __CMDGroup(AAZCommandGroup): | ||
| """Manage Spatio | ||
| """ | ||
| pass | ||
|
|
||
|
|
||
| __all__ = ["__CMDGroup"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from .__cmd_group import * |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from azure.cli.core.aaz import * | ||
|
|
||
|
|
||
| @register_command_group( | ||
| "planetarycomputer geocatalog", | ||
| ) | ||
| class __CMDGroup(AAZCommandGroup): | ||
| """Manage Geo Catalog | ||
| """ | ||
| pass | ||
|
|
||
|
|
||
| __all__ = ["__CMDGroup"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from .__cmd_group import * | ||
| from ._create import * | ||
| from ._delete import * | ||
| from ._list import * | ||
| from ._show import * | ||
| from ._update import * | ||
| from ._wait import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extension name is written as "Planetarycomputer" here, but elsewhere in this extension (e.g., CLI help summaries) it’s spelled "Planetary Computer". Please make the README title/intro consistent with the product name used in help text to avoid confusing users.